diff --git a/.github/workflows/develop-Linux.yml b/.github/workflows/develop-Linux.yml index 4e6d2031..4b56e28c 100644 --- a/.github/workflows/develop-Linux.yml +++ b/.github/workflows/develop-Linux.yml @@ -180,7 +180,7 @@ jobs: gendc_separator_version=${gendc_separator_version:1} fi - pip install ion-python==$ionkit_version + pip install ion-contrib-python==$ionkit_version pip install gendc-python==$gendc_separator_version pip install numpy pip install opencv-python @@ -199,6 +199,12 @@ jobs: cd ${{ github.workspace }}/download/installer/testcases/python python ionkit_test.py + - name: Test ion-kit with Aravis + run: | + cd ${{ github.workspace }}/download/installer/testcases/python + export GENICAM_FILENAME=${{ github.workspace }}/download/installer/testcases/python/arv-fake-camera.xml + python ionkit_contrib_test.py ${{ github.workspace }}/download/installer/testcases/python/ionkit_contrib_test.py + - name: Test OpenCV run: | cd ${{ github.workspace }}/download/installer/testcases/python diff --git a/.github/workflows/develop-Windows.yml b/.github/workflows/develop-Windows.yml index 30a0b80f..3de9431a 100644 --- a/.github/workflows/develop-Windows.yml +++ b/.github/workflows/develop-Windows.yml @@ -246,19 +246,23 @@ jobs: if ( $gendc_separator_version.StartsWith("v") ){ $gendc_separator_version = $gendc_separator_version.substring(1) } - pip install ion-python==$ionkit_version + pip install ion-contrib-python==$ionkit_version pip install gendc-python==$gendc_separator_version pip install numpy pip install opencv-python pip install aravis-python - - - name: Test ion-kit run: | cd ${{ github.workspace }}/download/installer/testcases/python python ionkit_test.py + - name: Test ion-kit with Aravis + run: | + cd ${{ github.workspace }}/download/installer/testcases/python + $ENV:GENICAM_FILENAME = "${{ github.workspace }}/download/installer/testcases/python/arv-fake-camera.xml" + python ionkit_contrib_test.py ${{ github.workspace }}/download/installer/testcases/python/ionkit_contrib_test.py + - name: Test OpenCV run: | cd ${{ github.workspace }}/download/installer/testcases/python diff --git a/installer/config.yml b/installer/config.yml index f53cc72a..246b9bd1 100644 --- a/installer/config.yml +++ b/installer/config.yml @@ -13,9 +13,9 @@ libraries: ion_kit: name: ion-kit - pkg_sha: "41913dcd5c752f2859c48893c8eb1fba04b4bb2faa0e327019ba1a3567c43127" + pkg_sha: "d85c31b70e128b7f22143cb2a91234f5e12e040094b5f74be950bf6620becd55" git_repo: "https://github.com/fixstars/ion-kit.git" - version: "v3.2.2" + version: "v3.2.3" opencv: name: opencv diff --git a/installer/testcases/python/arv-fake-camera.xml b/installer/testcases/python/arv-fake-camera.xml new file mode 100644 index 00000000..22bee147 --- /dev/null +++ b/installer/testcases/python/arv-fake-camera.xml @@ -0,0 +1,580 @@ + + + + + + DeviceControl + ImageFormatControl + AcquisitionControl + TransportLayerControl + Debug + + + + + + DeviceVendorName + DeviceModelName + DeviceManufacturerInfo + DeviceID + DeviceVersion + + + + Vendor Name +
0x48
+ 32 + RO + Device +
+ + + Model Name +
0x68
+ 32 + RO + Device +
+ + + Manufacturer Info +
0xa8
+ 48 + RO + Device +
+ + + Device ID +
0xd8
+ 16 + RO + Device +
+ + + Device Version +
0x88
+ 32 + RO + Device +
+ + + + + SensorHeight + SensorWidth + OffsetX + OffsetY + Width + Height + BinningHorizontal + BinningVertical + PixelFormat + + + + Full height of image sensor. + SensorHeightRegister + + + +
0x118
+ 4 + RO + Device + Unsigned + BigEndian +
+ + + Full height of image sensor. + SensorWidthRegister + + + +
0x11c
+ 4 + RO + Device + Unsigned + BigEndian +
+ + + X offset of image, in pixels. + OffsetXRegister + 0 + SensorWidth + 1 + + + +
0x130
+ 4 + RW + Device + Unsigned + BigEndian +
+ + + Y offset of image, in pixels. + OffsetYRegister + 0 + SensorHeight + 1 + + + +
0x134
+ 4 + RW + Device + Unsigned + BigEndian +
+ + + Width of image, in pixels. + WidthRegister + 1 + SensorWidth + 1 + + + +
0x100
+ 4 + RW + Device + Unsigned + BigEndian +
+ + + Height of image, in pixels. + HeightRegister + 1 + SensorHeight + 1 + + + +
0x104
+ 4 + RW + Device + Unsigned + BigEndian +
+ + + Binning in horizontal direction. + BinningHorizontalRegister + 1 + 16 + + + +
0x108
+ 4 + RW + Device + Unsigned + BigEndian +
+ + + Binning in vertical direction. + BinningVerticalRegister + 1 + 16 + + + +
0x10c
+ 4 + RW + Device + Unsigned + BigEndian +
+ + + Pixel format + + 17301515 + + + 17301514 + + + 17301512 + + + 17301513 + + + 17301505 + + + 35127316 + + + 17825799 + + PixelFormatRegister + + + +
0x128
+ 4 + RW + Device + Unsigned + BigEndian +
+ + + + + AcquisitionMode + AcquisitionStart + AcquisitionStop + TriggerSelector + TriggerMode + TriggerSoftware + TriggerSource + TriggerActivation + ExposureTimeAbs + + + + Start acquisition. + AcquisitionCommandRegister + 1 + + + + Stop acquisition. + AcquisitionCommandRegister + 0 + + + +
0x124
+ 4 + WO + Device + Unsigned + BigEndian +
+ + + Acquisition mode + + 1 + + + 2 + + + 3 + + AcquisitionModeRegister + + + +
0x12c
+ 4 + RW + Device + Unsigned + BigEndian +
+ + + AcquisitionFrameRateConverter + + + + Frame rate, in frames per second. + (1000000 / FROM) + (1000000 / TO) + AcquisitionFramePeriod + + + + AcquisitionFramePeriodRegister + 1000 + 10000000 + + + +
0x138
+ 4 + RW + Device + Unsigned + BigEndian +
+ + + + 0 + + + 1 + + TriggerSelectorInteger + + + + 0 + + + + Trigger mode + + 0 + + + 1 + + TriggerModeRegister + + + +
0x300
+ TriggerSelectorInteger + 4 + RW + Device + Unsigned + BigEndian +
+ + + Trigger source + + 0 + + + 1 + + TriggerSourceRegister + + + +
0x304
+ TriggerSelectorInteger + 4 + RW + Device + Unsigned + BigEndian +
+ + + Trigger activation + + 0 + + TriggerActivationRegister + + + +
0x308
+ TriggerSelectorInteger + 4 + RW + Device + Unsigned + BigEndian +
+ + + Generates an internal trigger. TriggerSource must be set to Software. + TriggerSoftwareCommandRegister + 1 + + + +
0x30c
+ 4 + WO + Device + Unsigned + BigEndian +
+ + + Exposure duration, in microseconds. + ExposureTimeAbsConverter + 10.0 + 10000000.0 + + + + FROM + TO + ExposureTimeAbsRegister + + + +
0x120
+ 4 + RW + Device + Unsigned + BigEndian +
+ + + + + GainRaw + GainAuto + + + + Raw gain. + GainRawRegister + 0 + 10 + + + +
0x110
+ 4 + RW + Device + Unsigned + BigEndian +
+ + + Automatic gain mode. + + 1 + + + 3 + + + 2 + + GainAutoRegister + + + +
0x114
+ 4 + RW + Device + Unsigned + BigEndian +
+ + + + + PayloadSize + + + + Width + Height + PixelFormat + WIDTH * HEIGHT * ((PIXELFORMAT>>16)&0xFF) / 8 + + + + Indicates whether a live grab is under way + Invisible + 0 + 0 + 1 + + + + + + TestRegister + + + + TestRegister + 321 + 123 + + + +
0x1f0
+ 4 + RW + Device + Unsigned + BigEndian +
+ + +
0x1f0
+ 4 + RW + Device + BigEndian + + + 31 + 16 + Signed + + + + 15 + 0 + Unsigned + + + + 15 + + + + 31 + 0 + Unsigned + +
+ + +
0x200
+ 32 + RW + Device +
+ + + + + + +
diff --git a/installer/testcases/python/ionkit_contrib_test.py b/installer/testcases/python/ionkit_contrib_test.py new file mode 100644 index 00000000..b62e4a5c --- /dev/null +++ b/installer/testcases/python/ionkit_contrib_test.py @@ -0,0 +1,32 @@ +from ionpy import Param, Buffer, Builder +import os +import sys +import numpy as np + +builder = Builder() +builder.set_target(target='host') +builder.with_bb_module(path='ion-bb') + +num_device = 1 +width = 128 +height = 128 + +node = builder.add('image_io_u3v_cameraN_u8x2') \ + .set_params([Param('num_devices', num_device), + Param("force_sim_mode", True), + Param('width', width), + Param('height', height)]) +output_p = node.get_port('output') + +output_size = (height, width, ) +output_data = np.full(output_size, fill_value=0, dtype=np.uint8) +output = Buffer(array= output_data) + +output_p[0].bind(output) + +for n in range(10): + # running the builder + builder.run() + for i in range(num_device): + print(output_data) + \ No newline at end of file