Skip to content

Commit

Permalink
Merge pull request #68 from zivid/2024-04-20-update-halcon-samples
Browse files Browse the repository at this point in the history
Samples: Minor updates
  • Loading branch information
andersfagerli authored Jun 14, 2024
2 parents adaf06b + 7332a9a commit 429a3df
Show file tree
Hide file tree
Showing 7 changed files with 219 additions and 138 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<l>set_framegrabber_param (AcqHandle, 'ResetAcquisitions', 1)</l>
<c/>
<c>* Setting global settings</c>
<l>set_framegrabber_param (AcqHandle, 'Engine', 'omni')</l>
<l>set_framegrabber_param (AcqHandle, 'Engine', 'stripe')</l>
<l>set_framegrabber_param (AcqHandle, 'SamplingColor', 'rgb')</l>
<l>set_framegrabber_param (AcqHandle, 'SamplingPixel', 'blueSubsample2x2')</l>
<l>set_framegrabber_param (AcqHandle, 'ProcessingFiltersSmoothingGaussianEnabled', 1)</l>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
<l>import './../../../Procedures'</l>
<l>get_zivid_sample_data_dir(ZividDataDir)</l>
<l>ScenePath := ZividDataDir + '/ObjectMatching/' + SurfaceModelFile + '/Im1.ply'</l>
<c>* Specify the camera that point cloud was taken with; options are: 'Zivid 2' and 'Zivid 2+'.</c>
<c>* Specify the camera that point cloud was taken with.</c>
<l>Camera := 'Zivid 2+'</l>
<c>* Specify SamplingPixel that point cloud was taken with; options are: 'all', 'blueSubsample2x2', and 'redSubsample2x2'</c>
<c>* Specify SamplingPixel that point cloud was taken with.</c>
<l>SamplingPixel := 'blueSubsample2x2'</l>
<l>get_zivid_camera_width (Camera, SamplingPixel, MapWidth)</l>
<l>read_object_model_3d (ScenePath, 'm', ['xyz_map_width'], MapWidth, ObjectModel3D_Scene, Status)</l>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<l>set_framegrabber_param (AcqHandle, 'ResetAcquisitions', 1)</l>
<c/>
<c>* Setting global settings</c>
<l>set_framegrabber_param (AcqHandle, 'Engine', 'omni')</l>
<l>set_framegrabber_param (AcqHandle, 'Engine', 'stripe')</l>
<l>set_framegrabber_param (AcqHandle, 'SamplingColor', 'rgb')</l>
<l>set_framegrabber_param (AcqHandle, 'SamplingPixel', 'blueSubsample2x2')</l>
<l>set_framegrabber_param (AcqHandle, 'ProcessingFiltersSmoothingGaussianEnabled', 1)</l>
Expand Down
10 changes: 0 additions & 10 deletions source/Camera/Basic/Capture.hdev
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,6 @@
<c>* Switching to single Frame mode</c>
<l>set_framegrabber_param (AcqHandle, 'AcquisitionMode', 'SingleFrame')</l>
<c/>
<c>* Configuring settings</c>
<l>set_framegrabber_param (AcqHandle, 'Aperture', 5.66)</l>
<l>set_framegrabber_param (AcqHandle, 'ExposureTime', 6500)</l>
<l>set_framegrabber_param (AcqHandle, 'Gain', 1)</l>
<l>set_framegrabber_param (AcqHandle, 'Brightness', 1)</l>
<l>set_framegrabber_param (AcqHandle, 'ProcessingFiltersOutlierRemovalEnabled', 1)</l>
<l>set_framegrabber_param (AcqHandle, 'ProcessingFiltersOutlierRemovalThreshold', 5)</l>
<l>set_framegrabber_param (AcqHandle, 'ProcessingFiltersSmoothingGaussianEnabled', 1)</l>
<l>set_framegrabber_param (AcqHandle, 'ProcessingFiltersSmoothingGaussianSigma', 1.5)</l>
<c/>
<c>* Capturing frame</c>
<l>grab_data (Image, Region, Contours, AcqHandle, ObjectModel3D)</l>
<c/>
Expand Down
9 changes: 5 additions & 4 deletions source/Camera/Basic/CaptureHDRCompleteSettings.hdev
Original file line number Diff line number Diff line change
Expand Up @@ -43,31 +43,31 @@
<c>* Configuring HDR settings for the first image</c>
<l>set_framegrabber_param (AcqHandle, 'Aperture', 8)</l>
<l>set_framegrabber_param (AcqHandle, 'ExposureTime', 10000)</l>
<l>set_framegrabber_param (AcqHandle, 'Brightness', 1)</l>
<l>set_framegrabber_param (AcqHandle, 'Brightness', 1.8)</l>
<l>set_framegrabber_param (AcqHandle, 'Gain', 1)</l>
<c/>
<l>set_framegrabber_param (AcqHandle, 'AddAcquisition', 1)</l>
<c/>
<c>* Configuring HDR settings for the second image</c>
<l>set_framegrabber_param (AcqHandle, 'Aperture', 4.00)</l>
<l>set_framegrabber_param (AcqHandle, 'ExposureTime', 10000)</l>
<l>set_framegrabber_param (AcqHandle, 'Brightness', 1)</l>
<l>set_framegrabber_param (AcqHandle, 'Brightness', 1.8)</l>
<l>set_framegrabber_param (AcqHandle, 'Gain', 1)</l>
<c/>
<l>set_framegrabber_param (AcqHandle, 'AddAcquisition', 1)</l>
<c/>
<c>* Configuring HDR settings for the third image</c>
<l>set_framegrabber_param (AcqHandle, 'Aperture', 4.00)</l>
<l>set_framegrabber_param (AcqHandle, 'ExposureTime', 40000)</l>
<l>set_framegrabber_param (AcqHandle, 'Brightness', 1)</l>
<l>set_framegrabber_param (AcqHandle, 'Brightness', 1.8)</l>
<l>set_framegrabber_param (AcqHandle, 'Gain', 1)</l>
<c/>
<l>set_framegrabber_param (AcqHandle, 'AddAcquisition', 1)</l>
<c/>
<c>* Setting global settings</c>
<l>set_framegrabber_param (AcqHandle, 'Engine', 'phase')</l>
<l>set_framegrabber_param (AcqHandle, 'SamplingColor', 'rgb')</l>
<l>set_framegrabber_param (AcqHandle, 'SamplingPixel', 'all')</l>
<l>set_framegrabber_param (AcqHandle, 'SamplingPixel', 'blueSubsample2x2')</l>
<l>set_framegrabber_param (AcqHandle, 'RegionOfInterestBoxEnabled', 1)</l>
<l>set_framegrabber_param (AcqHandle, 'RegionOfInterestBoxPointOX', 1000)</l>
<l>set_framegrabber_param (AcqHandle, 'RegionOfInterestBoxPointOY', 1000)</l>
Expand Down Expand Up @@ -102,6 +102,7 @@
<l>set_framegrabber_param (AcqHandle, 'ProcessingFiltersHoleRepairEnabled', 1)</l>
<l>set_framegrabber_param (AcqHandle, 'ProcessingFiltersHoleRepairHoleSize', 0.2)</l>
<l>set_framegrabber_param (AcqHandle, 'ProcessingFiltersHoleRepairStrictness', 1)</l>
<l>set_framegrabber_param (AcqHandle, 'ProcessingResamplingMode', 'upsample2x2')</l>
<l>set_framegrabber_param (AcqHandle, 'ProcessingColorBalanceBlue', 1)</l>
<l>set_framegrabber_param (AcqHandle, 'ProcessingColorBalanceGreen', 1)</l>
<l>set_framegrabber_param (AcqHandle, 'ProcessingColorBalanceRed', 1)</l>
Expand Down
6 changes: 0 additions & 6 deletions source/Camera/Basic/CaptureSavePLY.hdev
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,6 @@
<c>* Switching to single acquisition mode</c>
<l>set_framegrabber_param (AcqHandle, 'AcquisitionMode', 'SingleFrame')</l>
<c/>
<c>* Configuring settings</c>
<l>set_framegrabber_param (AcqHandle, 'Aperture', 5.66)</l>
<l>set_framegrabber_param (AcqHandle, 'ExposureTime', 6500)</l>
<l>set_framegrabber_param (AcqHandle, 'Gain', 1)</l>
<l>set_framegrabber_param (AcqHandle, 'Brightness', 1)</l>
<c/>
<c>* Capturing frame</c>
<l>grab_data (Image, Region, Contours, AcqHandle, ObjectModel3D)</l>
<c/>
Expand Down
Loading

0 comments on commit 429a3df

Please sign in to comment.