Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IR image like in web-visualizer #9

Closed
9and3 opened this issue Sep 24, 2021 · 2 comments
Closed

IR image like in web-visualizer #9

9and3 opened this issue Sep 24, 2021 · 2 comments

Comments

@9and3
Copy link

9and3 commented Sep 24, 2021

Hello!

I was wondering how it would be possible to get the IR image as shown in the Nimbus 3D-visualizer (see image below):
image
I have tried the snippet proposed in the repo:

from nimbusPython import NimbusClient
import time

cli = NimbusClient.NimbusClient('192.168.1.38')
cli.enaRawMode(True)
time.sleep(1) #<-- there might be still some 3D images in the pipeline
header, img = cli.getImage()
imgType = int(header[NimbusClient.HeaderImgType])
if imgType == NimbusClient.NimbusImageRaw:
    print ("raw images received")
    print(img)
else:
    print ("something went wrong...")
    #-> repeat image readout (cli.getImage())

Without any succeess, it seems that enabling the Raw Mode isn working in my case.
So I was wondering if there is any way to obtain or recompose the IR image matrix from the other image grabber:

header, (ampl, radial, x, y, z, conf) = cli.getImage(invalidAsNan=True)

Many thanks for any suggestion or help!

@bjajoh
Copy link
Member

bjajoh commented Sep 25, 2021

Hi @9and3,

Raw Mode means actually sensor raw data. Which can't be visualized by the web interface and does only include the phase information of the actual imager.
You probably want cli.enaRawMode(False) in order to see the sensor data in a meaningful representation.

In order to read the sensor data try that script mentioned earlier:
from nimbusPython import NimbusClient
cli = NimbusClient.NimbusClient("192.168.0.69")
header, (ampl, radial, x, y, z, conf) = cli.getImage(invalidAsNan=True)

Simply visualize the ampl and you should have the intensity image.

@9and3
Copy link
Author

9and3 commented Sep 25, 2021

Hello @bjajoh , thank you once again for your prompt feedback. Indeed, I was able to build a uint8 matrix and visualize it, thank you for the help!

@9and3 9and3 closed this as completed Sep 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants