Farfar
Posts: 2
Joined: Mon May 18, 2020 10:58 am

What camera for 20x20 cm @ 15cm?

Mon May 18, 2020 11:15 am

Hello.
We are making a sort-photo-booth.. its a "Tile-O-matic" and we need to take a picture of a cement tile from 15cm above the tile, and then multiply this 4 times (or more) to see the pattern. Any suggestions on which camera we should use?

The camera has to sit 15 cm above the tile and need to cover min 20x20cm (Square). Output will be to a regular monitor 90 degrees turned
see photo.
IMG_1.jpg
The "machine"
IMG_1.jpg (71.39 KiB) Viewed 311 times
IMG_2.jpg
Open drawer
IMG_2.jpg (63.96 KiB) Viewed 311 times
IMG_3.jpg
Lid for placement of camera
IMG_3.jpg (56.37 KiB) Viewed 311 times

gordon77
Posts: 4992
Joined: Sun Aug 05, 2012 3:12 pm

Re: What camera for 20x20 cm @ 15cm?

Wed May 20, 2020 2:21 pm

go here https://www.scantips.com/lights/fieldofview.html#top and enter the details for the pi cameras, 2 examples below

the v2 camera would need a 2mm lens, the new hq camera a 3.5mm lens to cover 20cm at 15cm

gordon77
Posts: 4992
Joined: Sun Aug 05, 2012 3:12 pm

Re: What camera for 20x20 cm @ 15cm?

Wed May 20, 2020 2:21 pm

go here https://www.scantips.com/lights/fieldofview.html#top and enter the details for the pi cameras, 2 examples below

the v2 camera would need a 2mm lens, the new hq camera a 3.5mm lens to cover 20cm at 15cm
Attachments
hq.jpg
hq.jpg (122.93 KiB) Viewed 262 times
v2.jpg
v2.jpg (121.47 KiB) Viewed 263 times

ethanol100
Posts: 637
Joined: Wed Oct 02, 2013 12:28 pm

Re: What camera for 20x20 cm @ 15cm?

Wed May 20, 2020 3:55 pm

Do the 15cm include the camera and lens, too? Then you will be even closer and need a smaller focal length..
You could try to buy the official v2 camera and replace the camera module with something like this (The focal length they mention is not correct, it is more like I would roughly estimate around 1.85mm).
You will still need some image processing to rectify the fish-eye like view, and for tiling, you will need some processing, to cut/rotate the tile.
Overall a nice little project, I like the idea.

User avatar
HermannSW
Posts: 2575
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: What camera for 20x20 cm @ 15cm?

Wed May 20, 2020 4:38 pm

ethanol100 wrote:
Wed May 20, 2020 3:55 pm
You will still need some image processing to rectify the fish-eye like view,
E.g. OpenCV Camera calibration with samples/python/calibrate.py demo (HQ camera photo below):
viewtopic.php?f=43&t=272658&p=1663011#p1662752
Image
https://stamm-wilbrandt.de/en/Raspberry_camera.html
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/raspiraw
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/github_repo_i420toh264

ethanol100
Posts: 637
Joined: Wed Oct 02, 2013 12:28 pm

Re: What camera for 20x20 cm @ 15cm?

Wed May 20, 2020 4:58 pm

With the lens mentioned in my previous post, you would get an image like this(I had to use a tripod, which blocks part of the view, camera only badly alligned...):
Image

The sensor was about 15cm away from the surface, maybe a bit less. I have drawn the 20x20cm square.

You could try to find a lens with a bit higher focal length, but this is one possibility which is directly available. You can use the image processing HermannSW suggested.

Farfar
Posts: 2
Joined: Mon May 18, 2020 10:58 am

Re: What camera for 20x20 cm @ 15cm?

Fri May 22, 2020 8:54 am

Fantastic. Thank you so much guys.

Factoring in the height of the lens as i see it from your test @ethanol100 is not needed i think. it looks like we have a lot of real-estate around to spare.
We could if needed, embed the camera into the lid, to compensate for the lens. But again, it looks like we have plenty of FOV. Great test, if you ever pop-by Oslo, come by and claim your prize. ;) (There wasn't a prize in the beginning of this thread, but there is now)

Regarding rotation, this will only apply to some of the tiles. Some dont mind being rotated, others should not be rotated.
Should we solve this with a "rotate option" on a button, (we are not planning on using a touch screen). We will be using an old
Samsung 24" 1920x1200 (S24E650XW)

Some patterns is fine in 4x4, others need 6x6, but i guess we could just fill the screen.

Or is there a wow-zee-pattern recognition algorithm out there that "understands" how it should be.

Enclosed is some photos of the different tile-setup for rotation, does not mind rotation and can´t be rotated.
Attachments
Rotate_add.jpg
This need rotation and add..
Rotate_add.jpg (59.59 KiB) Viewed 175 times
dont_mind.jpg
This one does not mind being rotated
dont_mind.jpg (59.04 KiB) Viewed 175 times
no_rotate.jpg
Can´t rotate
no_rotate.jpg (56.84 KiB) Viewed 175 times

Return to “Camera board”