I hope someone can help me with an issue I’m facing when cropping an image. I’m using the Rect() function to define a rectangle for cropping and the Map() function to crop the image.
When I use Rect(0, 0, 100, 100), the CreateImageMap() function successfully creates the cropped image for display. However, when I try to move the rectangle by defining it as Rect(5, 0, 100, 100) (to shift the cropping region), I get an error in the CreateImageMap() function.
ERROR: C-API call failed; try getting a log by using CVB LogGUI/silogutil: {“Name”: “CreateImageMap”, “CVC_ERROR_CODE”: 1}
Has anyone encountered a similar issue or know why this happens when changing the x or y coordinates of the rectangle?
I have tested the functionality with CVB 14.1.000 and it works as expected. You can find the C++ code below. I will test it with the latest CVB version and update you here.