basler / pypylon

The official python wrapper for the pylon Camera Software Suite
http://www.baslerweb.com
BSD 3-Clause "New" or "Revised" License
557 stars 207 forks source link

Intensity image and point cloud cannot be acquired #770

Closed NTECHAIFA closed 1 week ago

NTECHAIFA commented 1 month ago

Describe what you want to implement and what the issue & the steps to reproduce it are:

Hello. What I want to do is to display a Intensity Image and Point Cloud as shown in the blaze viewer when running python.   I am using Balser blaze-101. I ran the sample program but all I got was either the depth map being displayed or an error in the middle. All that was displayed when the following was performed was depth data. utilityimageformatconverter.py save_image.py opencv.py guiimagewindow.py   Depth data was also displayed when the following was performed basler/pypylon-samples/notebooks /deviceenumeration_and_configuration.ipynb

I can't make pylon viewer recognize the camera, but blaze viewer can display Intensity Image, Depth Map, and Point Cloud.

Is your camera operational in Basler pylon viewer on your platform

No

Hardware setup & camera model(s) used

Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz 3.60 GHz RAM: 16.0 GB OS : Windows 10

Camera: blaze-101 cable: GEV-C7M12-L10

Runtime information:

python: 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
platform: win32/AMD64/10
pypylon: 4.0.0 / 8.0.0.10
SMA2016a commented 1 month ago

This is correct that current pylon does not show the blaze camera. To display the images the opencv image windows is one of the good option

NTECHAIFA commented 1 month ago

I have already succeeded in getting openCV to display images from the camera. As per your first question, I was able to run some of the sample programs, including opencv.py. All of those that yielded images were depth data. The intensity image could not be acquired.

In addition, several lines in the sample program result in errors, for example, the last two lines in the following code both result in _genicam.LogicalErrorException. If this error does not seem to be related to the matter of images and point clouds not being displayed, please ignore this error story.

from pypylon import pylon camera = pylon.InstantCamera(pylon.TlFactory.GetInstance().CreateFirstDevice()) camera.Open() camera.Gain.Value =42 print(camera.GainRaw)

File "C:...\site-packages\pypylon\pylon.py", line 4336, in getattr return self.GetNodeMap().GetNode(attribute) File "C:...\site-packages\pypylon\genicam.py", line 1118, in GetNode return _genicam.INodeMap_GetNode(self, Name) _genicam.LogicalErrorException: Node not existing (file 'genicam_wrap.cpp', line 16740)

Also, how can I get a point cloud on python as I could not find sample code to display a point cloud?

cpt-wojtech commented 3 weeks ago

@NTECHAIFA I just got the information that the newest pypylon release 4.0.0 actually does support the blaze. So it won't be necessary to use Harvesters. The attached samples demonstrate how to access and display depth and intensity data as well as the point cloud. Those pypylon samples will be included into the upcoming blaze supplementary package release.

If you have further questions or need assistance, please feel free to contact your local Basler Support https://www.baslerweb.com/en/support/contact-overview/ pypylon_blaze_samples.zip

NTECHAIFA commented 1 week ago

I was able to successfully retrieve the point cloud data and image data. Thank you very much.