LCD Shield Orientation Incorrect for Sensor and Different from IDE Display

The display on the LCD shield is rotated 90 degrees from the display on the IDE. Also the long dimension of the sensor is not oriented to the long dimension of the LCD shield. Rotating the image to orient correctly for the LCD shield, causes the IDE display to be oriented incorrectly.

How can the the IDE and LCD Shield be orientated the same way?

Alan

They can’t currently. The IDE displays whatever the image is from the camera. It doesn’t understand if the camera is rotated.

The IDE and LCD Shield are both rectangular displays. They could both display the sensor image in the same orientation. It is just the order of how the pixels from the frame buffer are written to the LCD Shield.

The IDE just displays the image from coordinate 0,0. So, if you rotate the screen it has no idea this is happening.

I see what is going on now. The frame size used for the LCD Shield swaps the width and height of the frame.

For standard QQVGA, QVGA and VGA, the width of the rectangular framesize is greater than the height:
sensor.QQVGA: 160x120
sensor.QVGA: 320x240
sensor.VGA: 640x480

However, for the rectangular LCD Shield the “special” framesize used in the example has a width smaller than the height:
sensor.QQVGA2 # Special 128x160 framesize for LCD Shield.

I developed my application with the IDE using the QVGA framesize (adding text, etc to the image), but when trying to display this on the LCD Shield, because the frame width and height are inverted, the image on the LCD cannot be scaled to fit. When I rotated and scaled the framebuffer to match the inverted framesize of the LCD, the IDE display is then messed up.

Is it possible to provide and option to write the image to the LCD with the width x height aspects as the VGA standard (i.e. width > height)?

Yes, you can rotate the image before displaying it in the lcd. That said… this takes a lot of compute power. See the set()/assign() method.

Note, you’re going to want to disable automatic fb updates and then manually flush the image to the ide at specific periods since snapshot usually flushes whatever the previous image was.

It takes rotation and cropping to get a QVGA image into the LCD Shield, but as you said it takes a lot of compute power for what is easier to do in the lcd module.

The LCD Shield would much more usable if the lcd.display module had an option for an aspect ratio with width>height as is common for VGA frame sizes and rectangular sensors.

Yes… it’s just designed to be used upright.