-
Notifications
You must be signed in to change notification settings - Fork 70
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
Problem displaying images on visual studio (Too dark or only shows Invalid pixels) #307
Comments
Hi @ahmadLyneSystems! |
As for the invalid pixels: these, at first glance, look over exposed. Did you try reducing the long exposure time or using multiple exposures? |
Hey lola, Thanks for the reply. You're right about the amplitude image being normalized which I could fix using a simple image filter. I simply thought the dark contrast was a symptom of anothe problem. However, as I mentioned I'm mainly looking to reproduce the distance image output from the VisionAssistant software. As for the distance image, I should have mentioned that I only get the white image when I change the openCV data format to CV_8U, otherwise it's just a black image. The invalid pixels themselves aren't the problem because as you said, I could modify the application settings and exposure to eliminate them. When I run the above code for a distance image, I just get a black image. I tried applying different filters and transforms to it with no success. Edit: Apologies, I tried some further transformations and I could see some output from the distance image now. However, it's still mostly in black and white. Is there anyway for me to simply replicate the output I see in the VisionAssistant software? |
I am not sure what exact transformations are performed in the VA, I will need to look into this in more details--let me get back to you asap. |
Thanks for the update. I have been reading the operating instructions for the camera, particularly the chunk types section for each type of output image and I have a better understanding now of what ifm3d is outputting. Perhaps I naively assumed it will simply extract whatever output was there on the VA viewer instead of giving me raw data to work with. If you could somehow assist me with replicating the transformations made in the VA, it would be great. Otherwise I believe this particular issue is resolved. |
Hey @ahmadLyneSystems there is some sample code for scaling the image The amplitude data typically does have more dynamics than a 255Bit grayscale image. Could you please help me understand what exactly you want to achieve. The data displayed in Vision Assistant is exactly the same as in the Vision assistant. |
Hey @graugans, thanks for linking to the example code. I was actually trying to build a similar RGB scaling function on my own yesterday so this will be a great reference. Initially, I thought I had a problem with my ifm3d build which is why I asked the question. But since it's the expected output, I generally know how to proceed now. Most of the confusion is due to it being my first time working with a 3D camera instead of regular images so I have a much better idea of what to do now. Thanks for the assistance @graugans & @lola-masson! |
Hello,
I've been trying to setup ifm3d with our O3D311 camera on a windows environment with visual studio 2019. I built ifm3d using the PCL library and followed your windows installation guide on multiple versions of ifm3d but I'm still facing the same issue. I'm mainly concerned with obtaining the distance image but when I run the code below, all I get is either a black image or a white one with the black pixels representing the invalid pixels from the VA software.
System: windows
ifm3d version 0.20
Built using PCL boost library
Our code on C++:
`
outputs:
Distance image:
Amplitude image:
XYZ image:
I could not get the gray image to appear either as it gives an error:
OpenCV(3.4.9) Error: Assertion failed (size.width>0 && size.height>0) in cv::imshow, file C:\build\3_4_winpack-build-win64-vc15\opencv\modules\highgui\src\window.cpp, line 382
And our app dump:
I've also tried to use the openCV image buffer instead but I faced some uninitialized pointer errors on that side of things which I could share if required. Please let me know if need any additional info.
The text was updated successfully, but these errors were encountered: