-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #63 from zivid/2023-09-12-update-halcon-samples
Samples: Fix PLY loading and using M60 and L110
- Loading branch information
Showing
5 changed files
with
62 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<hdevelop file_version="1.2" halcon_version="21.11.0.0"> | ||
<procedure name="get_zivid_camera_width"> | ||
<interface> | ||
<ic> | ||
<par name="Camera" base_type="ctrl" dimension="0"/> | ||
<par name="SamplingPixel" base_type="ctrl" dimension="0"/> | ||
</ic> | ||
<oc> | ||
<par name="Width" base_type="ctrl" dimension="0"/> | ||
</oc> | ||
</interface> | ||
<body> | ||
<l>if (Camera == 'Zivid One+')</l> | ||
<l> Width := 1920</l> | ||
<l>elseif (Camera == 'Zivid 2')</l> | ||
<l> Width := 1944</l> | ||
<l>elseif (Camera == 'Zivid 2+')</l> | ||
<l> Width := 2448</l> | ||
<l>else</l> | ||
<l> throw('Unsupported camera: ' + Camera)</l> | ||
<l>endif</l> | ||
<c/> | ||
<l>if (SamplingPixel == 'blueSubsample2x2')</l> | ||
<l> Width := Width/2</l> | ||
<l>elseif (SamplingPixel == 'redSubsample2x2')</l> | ||
<l> Width := Width/2</l> | ||
<l>elseif (SamplingPixel != 'all')</l> | ||
<l> throw('Unsupported SamplingPixel: ' + SamplingPixel) </l> | ||
<l>endif</l> | ||
<c/> | ||
<l>return ()</l> | ||
</body> | ||
<docu id="get_zivid_camera_width"> | ||
<parameters> | ||
<parameter id="Camera"/> | ||
<parameter id="SamplingPixel"/> | ||
<parameter id="Width"/> | ||
</parameters> | ||
</docu> | ||
</procedure> | ||
</hdevelop> |