Draw circle on video frame (camera sight frame) using MvCameraControl.dll

44 views Asked by At

https://www.contrastech.com/en/service/005001005.html usung this SDKfor my LEO camera

Example using

    # ch:显示一帧图像 | en:Get a frame of an image using an internal cache(Cannot be used together with the interface of MV_CC_Display)
    def MV_CC_DisplayOneFrame(self, stDisplayInfo):
        MvCamCtrldll.MV_CC_DisplayOneFrame.argtype = (c_void_p, c_void_p)
        MvCamCtrldll.MV_CC_DisplayOneFrame.restype = c_uint
        # C原型:int MV_CC_DisplayOneFrame(IN void* handle, IN MV_DISPLAY_FRAME_INFO* pstDisplayInfo);
        return MvCamCtrldll.MV_CC_DisplayOneFrame(self.handle, byref(stDisplayInfo))

****************************************************************
            # Use the Display interface to display the image
            stDisplayParam = MV_DISPLAY_FRAME_INFO()
            memset(byref(stDisplayParam), 0, sizeof(stDisplayParam))
            stDisplayParam.hWnd = int(winHandle)
            stDisplayParam.nWidth = self.st_frame_info.nWidth
            stDisplayParam.nHeight = self.st_frame_info.nHeight
            stDisplayParam.enPixelType = self.st_frame_info.enPixelType
            stDisplayParam.pData = self.buf_save_image
            stDisplayParam.nDataLen = self.st_frame_info.nFrameLen
            self.obj_cam.MV_CC_DrawCircle(c_int(5))
            self.obj_cam.MV_CC_DisplayOneFrame(stDisplayParam)
****************************************************************

Not have info (LEO_SDK_(C)_Developer_Guide_2023_VT_EN.pdf) for this function MV_CC_DrawCircle

    #ch:在图像上绘制圆形辅助线 | en:Draw Circle Auxiliary Line
    def MV_CC_DrawCircle(self, stCircleInfo):
        MvCamCtrldll.MV_CC_DrawCircle.argtype = (c_void_p, c_void_p)
        MvCamCtrldll.MV_CC_DrawCircle.restype = c_uint
        # C原型: int __stdcall MV_CC_DrawCircle(IN void* handle, IN MVCC_CIRCLE_INFO* pCircleInfo);
        return MvCamCtrldll.MV_CC_DrawCircle(self.handle, byref(stCircleInfo))

MVCC_CIRCLE_INFO-??? It is not known what the structure should be

On the Chinese Internet I often saw these functions for libraries from Hiksvision cameras, maybe its popular dll.

Maybe someone has worked with this function and knows how to correctly describe the structure of a circle?

Or does anyone know a reverse engineering method, how can you get information about a function from a dll?

Draw a circle in the center of the frame

0

There are 0 answers