User Tools

Site Tools


hardware:apartmentcams

Cameras in the apartment

We have a set of industrial cameras for recordings of video in the apartment.

Specifically, they are Hikrobot MV-CS060-10GC-PRO link on the manufacturer's website. Datasheet. Manual. CAD Drawings. Files downloaded on 20230315 from Hik's website.

Recording videos with gstreamer and Aravis

gst-launch-1.0 -e --gst-plugin-path=/usr/local/lib  aravissrc camera-name="Hikrobot-MV-CS060-10GC-PRO-J11466033" exposure-auto=off exposure=50000 gain-auto=off gain=20 packet-delay=400 packet-size=9000 packet-resend=true do-timestamp=true  ! video/x-bayer, format=rggb, width=3072, height=2048, framerate=10/1 ! bayer2rgb ! video/x-raw, format=RGBA ! queue !  videoconvert ! openh264enc bitrate=100000 ! h264parse ! mp4mux ! filesink location=test.mp4

Activating compression

Normally the cameras deliver raw frames in 8 or more bits per pixel. The default thing to get is 8bit per pixel, and since we have the color version of the camera, there is Bayer filter on top. The gstreamer line above applies a bayer2rgb filter to bring back the colors.

At the high resolution of 3072×2048, the maximum frequency of the pictures we can get is 19Hz, after that we saturate the 1gbps link to each camera.

These cameras offer on-board compression, which can be activated like this:

arv-tool-0.8 control ImageCompressionMode=HB HighBandwidthMode=Burst

And to turn compression off again:

arv-tool-0.8 control ImageCompressionMode=Off

That applies the setting to all the cameras found in the bus.

After that setting is active, it is possible to increase the frequency of acquisition to 30Hz, but I don't yet know how to uncompress the frames. I asked Maxxvision for technical support on 20230315. (Alexis)

Getting list of configurable options

arv-tool-0.8 features > features.txt

That will contain a list of all the options, and mention if they are read/write or read-only. Note that some options do not show up until you have enabled others, or they might appear disabled.

To read an option, use the same control command as before, for example:

amaldo@camtest:~$ arv-tool-0.8 control HBVersion
Hikrobot-MV-CS060-10GC-PRO-J11466033 (192.168.50.96)
HBVersion = 1.0
Hikrobot-MV-CS060-10GC-PRO-J11466035 (192.168.50.98)
HBVersion = 1.0

ROS1 node that uses the Hikrobot SDK

This one looks useful, at least as inspiration:Hikrobot-MVS-camera-ros

MVS 2.1.2

As of 20230315 this is the latest version of the MVS / SDK that is supported in Linux. It was released on 20221024. The latest change is adding support for the HB format, so it looks like using this SDK to get the frames we can use compression.

Interesting function: MV_CC_HB_Decode

Setting Framerate

arv-tool-0.8 control AcquisitionFrameRate=30

Capturing at 30Hz using an MVS code example

arv-tool-0.8 control AcquisitionFrameRate=30 ExposureAuto=Off ExposureTime=1000 GainAuto=Off Gain=20 ImageCompressionMode=HB HighBandwidthMode=Burst
cd /opt/MVS/Samples/64/GrabImage_HighPerformance
export MVCAM_COMMON_RUNENV=/opt/MVS/lib
export LD_LIBRARY_PATH=/opt/MVS/lib/64
./GrabImage_HighPerformance

By default, this creates a directory called MvSdkLog, and inside you find a log file telling you this:

Info    2023-03-15 18:12:32  DevID:MV-CS060-10GC-PRO(J11466033)  Source-Line:libMvCameraControl.so(CInterfaceManager.cpp-L0809)     Description:Current dynamic library path[/opt/MVS/lib/64/libMvCameraControl.so]     Solution:
Info    2023-03-15 18:12:32  DevID:MV-CS060-10GC-PRO(J11466033)  Source-Line:libMvCameraControl.so(CInterfaceManager.cpp-L0812)     Description:CamCtl_Version: 3.2.2.1     Solution:
Info    2023-03-15 18:12:32  DevID:MV-CS060-10GC-PRO(J11466033)  Source-Line:libMvCameraControl.so(CInterfaceManager.cpp-L0813)     Description:CamCtl_Description: BaseLine Build 20220511     Solution:
Info    2023-03-15 18:12:32  DevID:MV-CS060-10GC-PRO(J11466033)  Source-Line:libMvCameraControl.so(CInterfaceManager.cpp-L0815)     Description:[MV_CC_CreateHandle] return[0x0]     Solution:
Info    2023-03-15 18:12:32  DevID:MV-CS060-10GC-PRO(J11466033)  Source-Line:libMvCameraControl.so(CInterfaceManager.cpp-L6687)     Description:CamCtrl[0x3020201], GigE SDKVersion[0x3020201], DriverVersion[0x0]     Solution:
Info    2023-03-15 18:12:33  DevID:MV-CS060-10GC-PRO(J11466033)  Source-Line:libMvCameraControl.so(CInterfaceManager.cpp-L4236)     Description:[MV_CC_InvalidateNodes] return[0x0]     Solution:
Info    2023-03-15 18:12:33  DevID:MV-CS060-10GC-PRO(J11466033)  Source-Line:libMvCameraControl.so(CInterfaceManager.cpp-L1086)     Description:[MV_CC_OpenDevice] nPrivilegeMode[1], nSwitchoverKey[0], return[0x0]     Solution:
Info    2023-03-15 18:12:33  DevID:MV-CS060-10GC-PRO(J11466033)  Source-Line:libMvCameraControl.so(CInterfaceManager.cpp-L1657)     Description:[GEV]Width[3072], Height[2048], PixelFormat[0x1080009], PayloadSize[6488128], ChunkCount[0], CompressMode[2], DeviceUptime[                                                           19784]     Solution:
Info    2023-03-15 18:12:33  DevID:MV-CS060-10GC-PRO(J11466033)  Source-Line:libMvCameraControl.so(CInterfaceManager.cpp-L1671)     Description:GigE, DeviceModelName[MV-CS060-10GC-PRO], DeviceFirmwareVersion[V3.4.43 210805666615 21061003], DeviceMaxThroughput[968795]     Solution:
Info    2023-03-15 18:12:33  DevID:MV-CS060-10GC-PRO(J11466033)  Source-Line:libMvCameraControl.so(CInterfaceManager.cpp-L1676)     Description:GigE, Width[3072], Height[2048], OffsetX[0], OffsetY[0], PixelFormat[0x1080009], AcquisitionMode[2]     Solution:
Info    2023-03-15 18:12:33  DevID:MV-CS060-10GC-PRO(J11466033)  Source-Line:libMvCameraControl.so(CInterfaceManager.cpp-L1682)     Description:GigE, TriggerMode[0], ResultingFrameRate[29.87], ExposureTime[1000.00], ExposureAuto[0], PayloadSize[6488128]     Solution:
Info    2023-03-15 18:12:33  DevID:MV-CS060-10GC-PRO(J11466033)  Source-Line:libMvCameraControl.so(CInterfaceManager.cpp-L1687)     Description:GigE, GevLinkSpeed[1000], GevHeartbeatTimeout[3000], GevSCPSPacketSize[8164], GevSCPD[40]     Solution:
Info    2023-03-15 18:12:33  DevID:MV-CS060-10GC-PRO(J11466033)  Source-Line:libMvCameraControl.so(CInterfaceManager.cpp-L6315)     Description:CamCtrl RecvThread Start, ThreadId[-41314624]     Solution:
Info    2023-03-15 18:12:33  DevID:MV-CS060-10GC-PRO(J11466033)  Source-Line:libMvCameraControl.so(CInterfaceManager.cpp-L6083)     Description:CamCtrl Display Thread Start, ThreadId[-49707328]     Solution:
Info    2023-03-15 18:12:33  DevID:MV-CS060-10GC-PRO(J11466033)  Source-Line:libMvCameraControl.so(CInterfaceManager.cpp-L1795)     Description:There is no registration callback     Solution:
Info    2023-03-15 18:12:33  DevID:MV-CS060-10GC-PRO(J11466033)  Source-Line:libMvCameraControl.so(CInterfaceManager.cpp-L1800)     Description:[MV_CC_StartGrabbing] return[0x0]     Solution:

Interesting is the ResultingFrameRate reported to 29.87Hz.

hardware/apartmentcams.txt · Last modified: 2023/03/15 17:49 by amaldo

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki