Rotate an image


I’m using CVB for acquisition. I would like to rotate the image since I had to turn the camera sideways to mount it properly for this scenario.

If you are using one of our VIN drivers, you can simply rotate the image by changing a value in the INI-file for the VIN.

Those INI-Files contain the parameter RotateImage which may take the values

0: Rotate 0 degrees
1: Rotate 90 degrees
2: Rotate 180 degrees
3: Rotate 270 degrees

For further information take a look at the specific CVB Driver User Guide for the image acquisition device you use.

That said, this approach changes the rotation for the whole acquisition process. If you only want to rotate a single image, you can also use general functions in CVB for rotating images like CreateMatrixTransformedImage, CreateMatrixTransformedImageEx and RotateImage. But those functions take “a long time” to perform. So, if you would do it for every image acquired it might slow down your whole acquisition where the image rotation via the VIN takes virtual no time at all. :slight_smile:

Thanks for the hint. I’m actually using the gige vin driver, I’ll try it with the ini parameters. :slight_smile:

Thanks @ConB. If this turns out to be the solution for your issue, it would be nice if you could mark the reply by @Frank as the solution :slight_smile:

Yes, It works. I’ll do that, I was not aware of that feature. :blush: