Tenrec-Builders / pi-scan

Pi Scan is a simple, robust capture appliance for book scanners. It runs on a Raspberry Pi 2.
BSD 2-Clause "Simplified" License
264 stars 37 forks source link

picture rotation not showing in exif data #10

Closed jhub95 closed 6 years ago

jhub95 commented 6 years ago

Hi, Jonathon. Sorry to bother you again. I'm so close to getting our scanner ready. Pi-Scan is working very well; I got some test pictures on my SD card. Here's the deal: the jpg files don't have rotation info in the exif data. That's my interpretation anyway. Attached are two files, one that is rotated correctly and one that I just took today that is not rotated.

The jpegs have to be rotated to Portrait for my automated crop, OCR utility to work. Any idea if this is a CHDK setting or something to do with the cameras (Canon A810)? BTW, they were working correctly about two years ago when I was using SpreadsPi to capture images.

As a side note, for some reason the picture seems really blueish. You'll see it when contrasting the two pictures. Do you happen to know what that's all about?

correct rotation taken today

Cheers. Justin

duerig commented 6 years ago

Pi Scan saves the images just as they come off of the camera. It doesn't do any post-processing, including modifying the EXIF data. So if possible, you should adjust your own post-processing scripts to do the rotation before the OCR or other steps you do.

Regarding the color, the white balance is set to 'Tungsten' which works well with the 3000K LED lights recommended for high color fidelity (SORAA 00919). However, if you have different lights, then the white balance will make things look blue-ish or yellow-ish. Try tweaking this line of code:

https://github.com/Tenrec-Builders/pi-scan/blob/master/src/camera_chdk.py#L68

Remember to follow the instructions I sent you in the other issue to make a permanent change after verifying that the temporary change does what you want. You want to change that white balance value to one of:

(0,1,2,3,4,5,7 = Auto, Day Light, Cloudy, Tungsten, Fluorescent, Fluorescent H, Custom) (from CHDK wiki)