cmucam3-hardware (#1) - Image rotation (#9) - Message List

Image rotation

Hi there,

I just got the CMUCAM3, and it's a pleasure to work on it :) My question is about data treatment and output. My cam has to be fixed upside-down, and I'd like to rotate the resulting data so it would be in the correct orientation on my screen. Is there a simple way to do that?

Thanks

François

  • Message #23

    I would say the best way to rotate the image is in the viewing program you are using. Libjpeg has some translation functions that can operate on a full compressed image in memory that you could try. Here is a sample program that comes with it: http://www.cmucam.org/browser/trunk/lib/jpeg-6b/jpegtran.c It seems like it could get complicated.

    In order to flip a raw image, you would need to be able to hold all of the data in memory at once. This is only possible on very low resolution color images. Some of the newer omni-vision chips have a flip image register setting, but I don't think the OV6620 supports that. Just to be sure you could check the data sheet: http://www.cmucam.org/attachment/wiki/Documentation/OV6620.PDF

    You can use "cc3_camera_set_raw_register ( reg, val );" function to change any of those options. (Playing with those registers can be fun in and of itself...)

    -anthony

    • Message #505

      I tried to figure out which position should the camera be. According the cmucam2GUI, CMUcam3 camera should had power and uart terminal at the bottom.

      But, when i tried color tracking the centroid giving opposite direction of the moving blob (i.e. taking top left pixel from the gui image as starting point).

      Is it true the image is actually upside down, therefore it give opposite tracking value of moving blob?

      really need some clarification or could you point documentation that i should read ..

      thanks