PlusToolkit / PlusLib

Software library for data acquisition, pre-processing, and calibration for navigated image-guided interventions.
http://www.plustoolkit.org
Other
130 stars 102 forks source link

fCal Spatial Calibration with RGB: (OpenCVVideo/MmfVideo) #1125

Closed ljhowell closed 8 months ago

ljhowell commented 8 months ago

Setup:

Windows 10, Plus Applications 2.8.0.2019-11-05 (Win64) GE Venue Fit Ultrasound System -> Magewell USB Capture HDMI -> PC USB(0) NDI Aurora (Probe, Reference, Stylus) -> PC USB(1)

Log file: fCal_cfg.zip

Description:

When using fCal for spatial calibration the segmentation algorithm produces no green dots over the wires preventing successful calibration. There is no crash but the following errors appear in the log:

|ERROR|1584.767000| vtkPlusTrackedFrameList::VerifyProperties failed: expected image type is BRIGHTNESS, actual type is RGB_COLOR| in E:\D\PSNP64b\PlusLib\src\PlusCommon\vtkPlusTrackedFrameList.cxx(952)
|ERROR|1584.768000| vtkPlusLineSegmentationAlgo video input data verification failed: video data orientation or type is not supported (MF orientation, BRIGHTNESS type is expected)| in E:\D\PSNP64b\PlusLib\src\PlusCalibration\vtkLineSegmentationAlgo\vtkPlusLineSegmentationAlgo.cxx(132)

I have tried using OpenCVVideo (as in the attached logfile) and MmfVideo. My USB capture device cannot stream in native greyscale. Is there another way to use the video stream from my HDMI->USB capture device, or to convert RGB_COLOR to BRIGHTNESS in PlusToolkit? Any help would be greatly appreciated!

Sunderlandkyl commented 8 months ago

The MmfVideo device should be able to stream in greyscale even if it isn't supported by the webcam. Plus will perform the conversion automatically.

ljhowell commented 8 months ago

Thanks for the quick response! I completed the calibration thanks to your tip. Using WmfVideo and setting ImageType="BRIGHTNESS" in the DataSource solved all my issues.

It would be nice if this also worked the same way when streaming with OpenCVVideo,

I will attach the updated config in case this helps anyone else: fCal_cfg_wmf.zip