Raspberry PI camera?

Everything camera related. Includes triggers, batteries, power supplies, flatbeds and sheet-feeding scanners, too.

Moderator: peterZ

dpc
Posts: 379
Joined: 01 Apr 2011, 18:05
Number of books owned: 0
Location: Issaquah, WA

Re: Raspberry PI camera?

Post by dpc »

Another data point for you, Bill. I have a Canon Elph 160 here and I took a photo of a page from a random paperback here and the resulting 5152x2896 pixel JPG image file was 5.33MB in size. This camera doesn't have CHDK installed so perhaps that has something to do with what you're seeing?

File Properties via Windows Image Viewer
File Properties via Windows Image Viewer
elph160.png (45.42 KiB) Viewed 105970 times
BillGill
Posts: 139
Joined: 18 Dec 2016, 17:13
E-book readers owned: Calibre, FBReader
Number of books owned: 7000
Country: USA

Re: Raspberry PI camera?

Post by BillGill »

That is a strange! I checked scans from couple of other books I have scanned and the images are all running in about the same size range. The pixel dimensions are also much lower than yours. But they are 180 dpi, the same as yours. Of course the dpi is kind of an awkward thing. dpi represents how many dots are displayed per inch of the display and is kind of artificial.

I just checked the camera settings and there doesn't seem to be anything in the menu that would affect the file size. The file size is mostly based on the compression ratio used in the conversion to JPG. I don't have CHDK on this camera, so that shouldn't be it. This is strange and I have no idea why there would be such a difference.

Bill
dpc
Posts: 379
Joined: 01 Apr 2011, 18:05
Number of books owned: 0
Location: Issaquah, WA

Re: Raspberry PI camera?

Post by dpc »

Press the 'FUNC' button, not the 'MENU' button on the back of the camera, then you'll see an option to change the image resolution.

I had actually had this particular camera set to 'W' which is less than the 'L' 20 megapixel size. I was playing around with this a while back as the 'W' setting's aspect ratio seems to fit the page better. I can take the photo with the 20MP ('L') setting and retrieve the image file properties if that would be helpful for you?
BillGill
Posts: 139
Joined: 18 Dec 2016, 17:13
E-book readers owned: Calibre, FBReader
Number of books owned: 7000
Country: USA

Re: Raspberry PI camera?

Post by BillGill »

Thanks, I'll have to try that. In that case the Canon may do a better job than the PI Camera.

It will certainly be simpler. I have been beating my head against the wall to get some software that would do what I want. I haven't found any available that does what I want it to do. That would be to show a preview, then snap the picture when I hit the space bar on the keyboard. I have been trying to roll my own, but I'm not familiar enough with Python to get it working.

Bill
dpc
Posts: 379
Joined: 01 Apr 2011, 18:05
Number of books owned: 0
Location: Issaquah, WA

Re: Raspberry PI camera?

Post by dpc »

There are other folks that post on this site that would know more about what it would take to capture a live preview from a point-and-shoot camera like the Elph 160 and retrieve that image over a USB connection to a PC. I'm guessing it would involve using a PTP protocol extension via CHDK and LibUSB on the PC.

I began to look into doing something similar years ago but decided that it would be easier just to buy a Canon DSLR and use the Canon SDK which has this capability (and it's still being supported and updated). I recall that Canon DSLR cameras ship with a CD that includes a PC application that displays a live view image from the camera on the PC and allows you to remotely control practically every camera setting remotely. That didn't work for me because it only supports a single camera and my scanner has two DSLRs.

You know, you could always just get a USB webcam on your laptop and point that at the display on the back of the Elph 160 to view it remotely. Pretty cheesy but if that helps you scan hundreds of books more easily, so be it. It's also probably not too difficult to get a keypress on your laptop to trigger the shutter to a CHDK enabled camera over USB. Someone has to have done that before, but again it would involve running LibUSB to circumvent Windows trying to communicate with the camera using the Canon USB driver. That in itself seems to have its own set of issues as Windows tries to restore the original Canon driver without you knowing about it from time to time and then you wonder why your app mysteriously quit working.
Konos93a
Posts: 186
Joined: 19 Sep 2016, 10:00
E-book readers owned: kobo aura,kindle 1,kindle pw3,pocketbook inkpad 2
Number of books owned: 3000
Country: greece

Re: Raspberry PI camera?

Post by Konos93a »

what about an extusb with perfect usb trasfer connection to a pc and A/V to a tv. i use 2 usb wires only to trigger with one click 2 cameras canon a3300 .have liveview with a/v to a tv and use an external sd cable to not move the cameras . complete usb 4 wires trasfer is possible. check this post viewtopic.php?f=15&t=3428 i think

now check this video and use subtitles https://www.youtube.com/watch?v=qQLRkAkxfao i use a smartphone and have liveview with vysor app ,the same time i have a access in the camera folder in pc and trigger the camera.

something more. upload in imgur some captured pages from the pi-camera and some from the canon and copy -paste the forum link .
Also abbyyfinereader 12 has an option to show suggested dpi . that is how i figure out if i have good or bad results with the distance . the more dpi the better .
dpc
Posts: 379
Joined: 01 Apr 2011, 18:05
Number of books owned: 0
Location: Issaquah, WA

Re: Raspberry PI camera?

Post by dpc »

Unfortunately the Canon Elph 160 doesn't support Live View through that connector. It will only output video over the A/V cable connection when the camera is in PLAYBACK mode and not SHOOT mode. I believe that my Canon DSLRs will happily do this though. They actually have mini-HDMI connectors so it makes it easy to connect to an external display.

BTW, there's a limit to the size of images that IMGUR supports. You can upload a large image, but they will limit its size on the server by using a more lossy JPEG encoding to save storage space.
BillGill
Posts: 139
Joined: 18 Dec 2016, 17:13
E-book readers owned: Calibre, FBReader
Number of books owned: 7000
Country: USA

Re: Raspberry PI camera?

Post by BillGill »

Backing up to my reply yesterday. I tried resetting the image quality on my Elph 160 and then snapped a test shot. When I ran it through the OCR I got a much better file than either the low res or the Pi Cam. So I am recommending that people not use the Raspberry PI with a Pi Camera. The image quality is not really all that good, and so far I haven't come up with a good software solution for control of the Raspberry PI. I expect I could come up with something. I am something of a programmer (mostly Visual Basic) but learning Python to create my own software is just too much, when I can do better with my Canon.

One caution: I have 2 of the Canon Elph 160s. One of them I can set to the high resolution mode. The other one I can't. I have no idea why, I suppose some firmware change, but it just doesn't appear. However, for my scanner I am using only one, so that is ok.

With my current set up (viewtopic.php?f=14&t=3467) I don't use any extra controls, just the cameras shutter release. The design is sturdy enough that this doesn't shake the system. And for preview I have a mirror mounted below the camera so I can check the registration.

Just for information. I switched to a single camera system because I am scanning a lot of books where the gutter margin is very narrow and the platen on a 2 camera system cannot get far enough down into the gutter so that the cameras can see all the way to the inner ends of the lines. With one camera I can slide the book far enough up against the edge of the platen so that the whole line can be captured. It takes a little longer to scan the books, but the time is more than made up in not having to edit the inner ends of all those truncated lines.

Bill
dpc
Posts: 379
Joined: 01 Apr 2011, 18:05
Number of books owned: 0
Location: Issaquah, WA

Re: Raspberry PI camera?

Post by dpc »

One of them I can set to the high resolution mode. The other one I can't.
Press 'FUNC SET' and then set the camera to PROGRAM (P) mode. You should be able to set the image resolution after making that change.
BillGill
Posts: 139
Joined: 18 Dec 2016, 17:13
E-book readers owned: Calibre, FBReader
Number of books owned: 7000
Country: USA

Re: Raspberry PI camera?

Post by BillGill »

Thanks, that did it.

Bill
Post Reply