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

Re: Raspberry Pi High Quality Camera

Thu Jun 04, 2020 8:28 pm

Until now I knew that HQ camera had cool features (12MP, 239s long exposures, ...).
But I was not aware of increased brightness (and sharpness) compared to v2 or v1 cameras.

I really liked @Aardappeltaart's today thread "Macro photography with reversed lens technique".
I had no lens reverse mount, so I created one from CS to M12 mount and 4 drops of superglue:
viewtopic.php?f=43&t=210605&p=1673492#p1673444

Results were impressive; later I did put one of my micrometers below my reverse mounted cheap CS lens rated 1/2.5" 4mm 3MP.
The results I got were so clear and bright, I have never seen anything comparable with v2 or v1.

This is gimp 100% view of center part of 12MP photo of micrometer.
Diversions are 10µm apart, so measured line is 150µm long, and 470px.
150µm/470px = 0.319µm/px
viewtopic.php?f=43&t=210605&p=1673492#p1673492
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/working_with_FPGAs

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

Re: Raspberry Pi High Quality Camera

Sat Jun 06, 2020 3:34 pm

I revisited this posting from a month ago in this thread. There I took photo of 2.3km distant "Ohrsbergturm" with HQ camera and 70mm M12 lens with CStoM12 adapter ring:
viewtopic.php?f=43&t=272658&start=50#p1656283

Today I looked for the longest focus camera sample I received from Lee from Arducam, and tried 35mm C-mount lens. This time I used raspistill's "--focus" option for easy focusing (it was not that easy with manual focus and adjustable aperture compared to previous photos I took today):
snapshot.png.jpg
snapshot.png.jpg
snapshot.png.jpg (70.03 KiB) Viewed 3144 times

The 1:1 copy out of from 12MP photo captured with just "raspistill -o tst.png" is amazingly clear, much better than with the 70mm lens. And because of 35mm vs. 70mm focal length it is half the size. I really like this 35mm photo details over 2.3km distance!
(6MB 12MP photo: https://stamm-wilbrandt.de/en/forum/tst.35mm.jpg)
tst.35mm.part.jpg
tst.35mm.part.jpg
tst.35mm.part.jpg (13.26 KiB) Viewed 3144 times
HermannSW wrote:
Wed May 06, 2020 6:14 pm
I copied out 1:1 just the Ohrsbergturm from full 12MP photo, impressive details for 2.3km distant:
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/working_with_FPGAs

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

Re: Raspberry Pi High Quality Camera

Sat Jun 06, 2020 9:11 pm

The 35mm lens is really heavy, together with HQ camera 109g in total. Using 4th drop of superglue for high precision PT camera system to glue M6 screw (instead of camera module) allows to mount HQ camera. Superglue is really strong enough for that weight:
https://forum.arduino.cc/index.php?topi ... msg4631628
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/working_with_FPGAs

User avatar
linkdude240
Posts: 22
Joined: Tue Mar 22, 2016 10:48 pm
Location: United States Midwest

Re: Raspberry Pi High Quality Camera

Sun Jun 07, 2020 8:11 pm

Wow, the smoothness of operation with those stepper motors is really something. I was thinking since I have a Lynxmotion control board for hobby servos about making an auto-tracker for the HQ camera but was wondering about the wieght. Hobby servos are more than likely up to the task (I have a pretty powerful one that can lift in units of Kg) but was thinking about a counterbalance as well.

It would be cool to see some tracking shots using that. With ephemeris data and steppers you could make an automated GoTo camera that takes periodic pictures of the heavenly bodies. Would be a neat showcase of a lot of Raspi Tech coming together!

Unfortunately, being in USA, I am waiting a pretty long time for the HQ camera. I wonder, being mounted on an armature like that, how the HQ camera holds up to the shaking? It looks pretty smooth but motion can mess up the final result of an image anyways. I think the HQ camera is more light sensitive than the other module by quite a lot but I just wonder how clear the images could become?

Also, that plane tracking project is awesome! Does that use ADSB to find planes or...?

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

Re: Raspberry Pi High Quality Camera

Mon Jun 08, 2020 4:35 pm

Also, that plane tracking project is awesome! Does that use ADSB to find planes or...?
No, the plane tracking is just one example of "Advanced modifying pipeline" in my i420toh264 framework:
https://github.com/Hermann-SW2/userland ... g-pipeline
I use raspividyuv to get a stream of i420 (YUV) frames, then use bash pipeline and small C programs to process and/or modify frames on the fly, and finally store them converted with GPU into .h264 video (mainly because of size, so that storing on SD card is no show stopper).
"Locating airplane" just spots darkest point in specific area of frame, and then adds a small 2x2 white dot onto it.
I wanted to use the coordinates determined (in real time) to make my stepper PT camera system move camera so that airplane keeps in center of frame.
For operation I would direct camera to where the airplanes come from (airport for starting, other direction for landing). Code would detect a dark spot before bright sky at some point, center camera view and follow until out ouf sight. Finally it moves back to initial position to catch next airplane,

Originally I wanted to use my 70mm focal length lens, but given the much nicer frames from HQ camera I will likely go with HQ camera and Arducam 35mm lens instead:
Image


That will get nice inflight airplane frames by just shooting out of the window. Airplanes pass my secondary living place near IBM Böblingen lab, as well as our house in Eberbach in less than 2km distance. From above. this is 1:1 copy out of 12MP photo taken with HQ camera and 35mm lens. Airplanes are so much longer than the small "Ohrsbergturm" tower is wide (perhaps 6m):
Image


P.S:
I did capture similar speed objects inflight with v1 camera in the past (348km/h, once even 392km/h).
They did not pass the camera in more than 1km distance, but in 20cm distance ;-)
https://github.com/Hermann-SW/Raspberry ... nt-9000eps
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/working_with_FPGAs

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

Re: Raspberry Pi High Quality Camera

Tue Jun 09, 2020 8:06 am

linkdude240 wrote:
Sun Jun 07, 2020 8:11 pm
It would be cool to see some tracking shots using that.
Thanks for that request. I realized that the Arduino code for controlling stepper PT camera system showed some jitter with HQ camera plus 35mm lens mounted, even when joystick is not touched at all. I fixed that yesterday, now code does not show jitter like below anymore:
https://forum.arduino.cc/index.php?topi ... msg4633850
Image


To my knowledge youtube allows to upload 25fps, 30fps and 60fps videos.
I chose to capture with HQ camera mode 4 (1012x760) at 60fps.
This was the command I used to capture 20s video:

Code: Select all

raspivid -md 4 -w 1012 -h 760 -t 20000 -fps 60 -o tst.20.h264 -pts tst.20.pts

ptsanalyze tool on the created tst.20.pts timestamp fiile shows that really 60fps got captured, with 0 frame skips:
https://github.com/Hermann-SW/userland/ ... ptsanalyze

Code: Select all

$ ptsanalyze tst.20.pts 
creating tstamps.csv
1192 frames were captured
majority framerate 60fps
  frame delta time[us] distribution
      1 16586
      1 16608
      1 16622
      2 16625
      1 16628
      1 16631
      1 16633
      1 16634
      1 16638
      1 16640
      1 16641
      1 16645
      2 16646
      2 16648
      1 16649
      7 16650
      6 16651
      6 16652
     11 16653
     14 16654
     74 16655
    152 16656
    393 16657
    299 16658
    110 16659
     47 16660
     12 16661
      6 16662
      9 16663
      4 16664
      2 16665
      4 16666
      2 16667
      1 16669
      1 16674
      2 16675
      1 16681
      1 16682
      1 16685
      1 16686
      1 16689
      1 16690
      1 16693
      1 16711
      1 16728
> after skip frame indices (middle column)
0 frame skips (0%)
average framerate 60fps
$ 

Long ago I learned from 6by9 how to create an .mkv video from .h264 and .pts that has correct timestamps. Since all frame deltas are in small 16586..16728 microsecond range, that is not absolutely needed, but anyway this script does that:

Code: Select all

$ cat mkv
#!/bin/bash
mkvmerge -o $1.mkv --timecodes 0:$1.pts $1.h264
$ 

Code: Select all

🍓 mkv tst.20
mkvmerge v31.0.0 ('Dolores In A Shoestand') 32-bit
'tst.20.h264': Using the demultiplexer for the format 'AVC/h.264'.
'tst.20.h264' track 0: Using the output module for the format 'AVC/h.264 (unframed)'.
The file 'tst.20.mkv' has been opened for writing.
Progress: 100%
The cue entries (the index) are being written...
Multiplexing took 1 second.
🍓 

I did upload tst.20.mkv to youtube:
https://www.youtube.com/watch?v=Ko7Dg7lJ8JQ
I verified that the youtube video is really 60fps by single stepping (stop video, press "."/"," keys for forward/backward step) and seeing that it really takes 60 frames from one second flip to the next. Stats for nerds also shows that video is 958x720@60 (frames were scaled down from 1012x760 by youtube upload). I captured this frame in a phase of fast upward movement of camera, a bit blurry, but not that much. Video can be made sharper by capturing with reduced shutter time:
tst.20.yt.jpg
tst.20.yt.jpg
tst.20.yt.jpg (57.11 KiB) Viewed 2915 times
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/working_with_FPGAs

User avatar
jbeale
Posts: 3716
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Raspberry Pi High Quality Camera

Wed Jun 17, 2020 2:19 am

In case anyone else is looking around for so-called "4k" resolution lenses. I have so far found only one f=12mm M12 lens with reasonably high claimed resolution ("10MP") which was on the "4klens.co" company website. Their contact info says
4K LENS (DBA) Unit 01,10/F,Carnival Commercial BLD, 18 Java Road, North Point, HongKong +852 2578 5898 Email: support@4klens.co

Their website looks reasonable, with a number of interesting lenses on it. However I'm just advising anyone thinking of buying there, that I recommend you first confirm there's a person on the other end willing to communicate with you. Two weeks after my payment and order confirmation there is no further news, and I have been unable to reach anyone at that site with multiple tries by online chat, email, or their contact form.

EDIT: I was too quick to give up! Today 9-JULY-2020, I received my f=12mm M12 lens, which I had ordered on 29-MAY-2020. So after 41 days, they did deliver. They just don't communicate. So far the lens does appear better than a cheaper "5MP" M12 lens I had before. Whether the new lens was worth the $60 I am still unsure.
Last edited by jbeale on Thu Jul 09, 2020 10:12 pm, edited 1 time in total.

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

Re: Raspberry Pi High Quality Camera

Wed Jun 17, 2020 1:01 pm

@jbeale The 17$ lens I did order 6 weeks ago claiming 12MP arrived today:
20200617_143348.part.20%.jpg
20200617_143348.part.20%.jpg
20200617_143348.part.20%.jpg (42.35 KiB) Viewed 2586 times
You did calculate that it is a 8.3MP lens for Raspberry HQ camera because of 1/1.7":
viewtopic.php?f=43&t=272658&start=75#p1656823

I did capture a photo from 1st floor window sill, like yesterday where I used 35mm lens (for capturing birds inflight)
viewtopic.php?f=43&t=273400&p=1680784#p1680313
I focused using raspistill's "--focus" feature on bird feeder in center of image.
Below is 12MP photo captured scaled to 10% to meet forum attachment size restrictions, 8.1MB 100% image is here:
https://stamm-wilbrandt.de/en/forum/CS. ... 7.12MP.jpg
CS.8mm.1div1.7.12MP.10%.jpg
CS.8mm.1div1.7.12MP.10%.jpg
CS.8mm.1div1.7.12MP.10%.jpg (176.95 KiB) Viewed 2586 times

Looks good to me, but I am not an expert. Nor do I know how to verify whether the lens is really 8.3MP as you calculated.


I do buy items on aliexpress.com, since in cases you decribe I just get my money back.
I just looked, did buy 495 items on aliexpress.com in the last 5 years, with only very few disputes.
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/working_with_FPGAs

User avatar
jbeale
Posts: 3716
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Raspberry Pi High Quality Camera

Wed Jun 17, 2020 2:46 pm

HermannSW wrote:
Wed Jun 17, 2020 1:01 pm
@jbeale The 17$ lens I did order 6 weeks ago claiming 12MP arrived today:
Thank you for that timely post, from the example image that lens looks like a good value! I found a few other f=8mm lenses claiming good resolution, but f=12mm was more difficult to find. My overseas-online shopping experience has been similar to yours; very seldom a problem- but very rarely do I step outside ebay or aliexpress. Now I have learned a lesson.

EDIT: I actually received the lens today, after 41 days! Will post an example soon.
Last edited by jbeale on Thu Jul 09, 2020 10:13 pm, edited 1 time in total.

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

Re: Raspberry Pi High Quality Camera

Wed Jun 17, 2020 4:02 pm

@jbeale
6 weeks ago I received a packet from Lee from Arducam with quite some C- and CS-mount lens samples, as well as Arducam M12 lens kit for HQ camera:
viewtopic.php?f=43&t=249483&p=1674386#p1674141

Among the Arducam lenses received I searched for all lenses that can do 8mm, all on uctronics.com: (right click for 100% view of 16MP smartphone photo for details)
Image
Together with the CS 8mm 1/1.7" claiming 12MP I now have 6 lenses for a 8mm comparison.

How can the claimed MP values for those that claim be verrified?
How can MP value for the others be determined?
Are there special tables similar to camera color tables that allow for MP determination?

I get quite impressive 0.21µm/px 12MP images with M12 180° lens mounted reversed as macro lens, and DIV=0.01mm micormeter divisions can be seen clearly:
viewtopic.php?f=43&t=210605&p=1680357#p1678792
Would mounting above 6 lenses reversed as macro lens allow to get insight on MP rating of the lenses?


P.S:
Yesterday I did run a Teensy code on micro-stepping you posted 2012 on an Arduino Uno ...
https://forum.pjrc.com/threads/26359-25 ... per-motors
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/working_with_FPGAs

User avatar
jbeale
Posts: 3716
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Raspberry Pi High Quality Camera

Wed Jun 17, 2020 5:58 pm

Looks like you've got a nice selection of lenses to compare. I'm not sure what "X megapixel" on a lens really means in a technical sense. A chart of the lens MTF (modulation transfer function) across the field, at least has a defined meaning. I suppose the bottom line with any lens test is whether you find the final image quality acceptable, or not. I do have a cheap "5 MP" f=12mm lens in the M12 format. It's not unusable, but has a lot of flare on highlights, and is not terribly crisp anywhere in the frame. Two examples taken this morning from that f=12mm lens:
still: https://photos.app.goo.gl/dGt9mQm8brHUXZhn9
video: https://www.youtube.com/watch?v=i4v97b92Xug

( Haven't used a 28BYJ-48 stepper in a while, but it seems our interests run in similar directions! )

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

Re: Raspberry Pi High Quality Camera

Wed Jun 17, 2020 7:43 pm

Thanks, I will look into MTF.
jbeale wrote:
Wed Jun 17, 2020 5:58 pm
video: https://www.youtube.com/watch?v=i4v97b92Xug
Did you capture that video with HQ camera?
There is a big frame skip from 11s+17 frames to 11s+18frames in the video [assuming the bunny did not beam ;-)].
(single steppig in youtube video by stopping, then "."/"," keys for single frame fore/back)
I have seen frameskips with 12MP HQ raspivid seldom, but they can be several seconds long ...
( Haven't used a 28BYJ-48 stepper in a while, but it seems our interests run in similar directions! )
I have 5µm per step in X and Y direction of microscope two-axis sliding-table currently:
viewtopic.php?f=43&t=210605&start=75#p1677057
I superglued 28BYJ-48 to microscope stand wheel allowing for 8.8µm per step with full-steps:
https://forum.arduino.cc/index.php?topi ... msg4642265

I know you talk about micro-stepping not necessarily giving better resolution compared to full/half-stepping because of backlash.
But yesterday I was successful to move to the same 5µm distant four positions 100 times with no differences noticed (with a trick):
viewtopic.php?f=43&t=210605&p=1680357#p1680357

I hope that micro-stepping will allow me to get X/Y/Z step widths down to 1µm, that would be enough.
Do you think that is reasonable?
(I will try and see on HDMI monitor whether it really is possible)


After I have seen that adding a stepper motor to microscope knob was so easy, I will try to add to lens focus and/or aperture ring later as well.
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/working_with_FPGAs

User avatar
jbeale
Posts: 3716
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Raspberry Pi High Quality Camera

Wed Jun 17, 2020 10:06 pm

That video is from the Pi HQ camera, but I was using a motion-activated program, PiKrellCam configured with a short timeout after initial detected motion. The frame skips are only because that is actually four separate motion-triggered videos, glued together.

Re: stepper, yes, with constant loading torque, and avoiding backlash by approaching from the same direction, I would expect much improved resolution over full or half steps. Another difficulty is the micro-steps are not all the same size, due to various effects, but if you are just looking at repeatability at the same position, it might be pretty good.

User avatar
jbeale
Posts: 3716
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Raspberry Pi High Quality Camera

Sun Jun 21, 2020 3:26 am

Anyone know why this should be true? (running an application using the HQ camera with two video paths, preview & record, a Pi 2 has significantly higher performance than a Pi 4): viewtopic.php?f=43&t=115583&start=1500#p1682869

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

Re: Raspberry Pi High Quality Camera

Thu Jun 25, 2020 8:18 am

I played with 35mm C-mount lens inhouse and focused on 55cm distant microscope two-axis sliding-table.
When I set aperture to 16, image becomes black, even if I light the scene directly with 1000lm desk lamp.
A bit less and a very dark image can be seen.
What I really like is aperture F=1.7, very bright image just with daylight from window 3m distant, no desk lamp needed.
And "--focus" Figure of Merit values are in 3K range and not only 200 range with F=14.
I really like the effect of F=1.7 in getting only focused sharp and else blurry on the frame.
Screenshot of 1024x600 7" DPMI display taken with raspip2ng via ssh session and converted with "pngtopnm snapshot.png | pnmtojpeg > snapshot.png.jpg" to fit forum attachment size limit:
snapshot.png.jpg
snapshot.png.jpg
snapshot.png.jpg (55.18 KiB) Viewed 2076 times
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/working_with_FPGAs

CanPi
Posts: 64
Joined: Wed May 20, 2020 12:21 pm

Re: Raspberry Pi High Quality Camera

Thu Jun 25, 2020 9:16 pm

HermannSW wrote: That's diffraction at work on the smaller aperture,smearing the image (but providing better DOF)
I really like the effect of F=1.7 in getting only focused sharp and else blurry on the frame.
That's shallow Depth Of Field, at wider apertures.

Best sharpness at the image plane is probably around f/4 +/- one stop for this lens. If you have time, try it and let us know.

CanPi
Posts: 64
Joined: Wed May 20, 2020 12:21 pm

Re: Raspberry Pi High Quality Camera

Thu Jun 25, 2020 9:18 pm

[quote
And "--focus" Figure of Merit values are in 3K range and not only 200 range with F=14
[/quote]

That's diffraction at work on the smaller aperture,smearing the image (but providing better DOF)
I really like the effect of F=1.7 in getting only focused sharp and else blurry on the frame.
That's shallow Depth Of Field, at wider apertures.

Best sharpness at the image plane is probably around f/4 +/- one stop for this lens. If you have time, try it and let us know.

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

Re: Raspberry Pi High Quality Camera

Thu Jun 25, 2020 11:14 pm

https://en.wikipedia.org/wiki/Aperture#In_photography
The photography term "one f-stop" refers to a factor of √2 (approx. 1.41) change in f-number, which in turn corresponds to a factor of 2 change in light intensity.
CanPi wrote:
Thu Jun 25, 2020 9:18 pm
Best sharpness at the image plane is probably around f/4 +/- one stop for this lens. If you have time, try it and let us know.
Thanks, I will do that tomorrow morning at daylight for comparable setup.

Although Wikipedia says
https://en.wikipedia.org/wiki/Aperture#Optimal_aperture
There is accordingly a sweet spot, generally in the f/4 – f/8 range, depending on lens, where sharpness is optimal,
That would be f/5.6 +/- one stop, right?

The 35mm lens has 6.5 "f-stop"s:

Code: Select all

$ echo "l(16/1.7)/l(sqrt(2))" | bc -ql
6.46893050727404587937
$
Range slightly bigger than typical f/2..f/16 range, markers for 1.7, 2.8, 4, 8 and 16.
Big area with F=1.7 (left), very small area with F=16 (right); factor between areas is (16/1.7)^2=88.6:
aperture.20%.jpg
aperture.20%.jpg
aperture.20%.jpg (71.56 KiB) Viewed 1943 times

P.S:
Currently not the 35mm lens is mounted to HQ camera, but a M12 180° lens mounted reversed as macro lens for 0.21µm/px resolution microscope:
viewtopic.php?f=43&t=210605&start=100#p1678792
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/working_with_FPGAs

CanPi
Posts: 64
Joined: Wed May 20, 2020 12:21 pm

Re: Raspberry Pi High Quality Camera

Fri Jun 26, 2020 7:31 am

HermannSW wrote:
Thu Jun 25, 2020 11:14 pm
The photography term "one f-stop" refers to a factor of √2 (approx. 1.41) change in f-number, which in turn corresponds to a factor of 2 change in light intensity.
There is accordingly a sweet spot, generally in the f/4 – f/8 range, depending on lens, where sharpness is optimal,
That would be f/5.6 +/- one stop, right?
Correct
HermannSW wrote:
Thu Jun 25, 2020 11:14 pm
The 35mm lens has 6.5 "f-stop"s:

Code: Select all

$ echo "l(16/1.7)/l(sqrt(2))" | bc -ql
6.46893050727404587937
$
Right
HermannSW wrote:
Thu Jun 25, 2020 11:14 pm
Range slightly bigger than typical f/2..f/16 range, markers for 1.7, 2.8, 4, 8 and 16.
Big area with F=1.7 (left), very small area with F=16 (right); factor between areas is (16/1.7)^2=88.6
Right again. You can verify that the relative apertures are correctly indicated on the lens by taking a raw capture of a uniformly illuminated surface at f/1.7, choosing shutter speed so that you are a little below clipping and take the mean of a 200x200 raw crop in the center. Repeat at f/16 without changing shutter speed or anything else and compute the ratio of the two means to see whether it is close to 88.6.

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

Re: Raspberry Pi High Quality Camera

Fri Jun 26, 2020 2:03 pm

CanPi wrote:
Thu Jun 25, 2020 9:18 pm
Best sharpness at the image plane is probably around f/4 +/- one stop for this lens. If you have time, try it and let us know.
I did capture in the morning, similar scene, same 55cm distance to microscope two-axis sliding-table.
I did capture for F=2.8/4/5.6/8 to be complete, the frame for F=8 at least being too dark:
Size for F=2.8/4/5.6/8 is 5.7/5.2/4.8/3.6MB:
https://stamm-wilbrandt.de/en/forum/tst.2_8.jpg
https://stamm-wilbrandt.de/en/forum/tst.4.jpg
https://stamm-wilbrandt.de/en/forum/tst.5_6.jpg
https://stamm-wilbrandt.de/en/forum/tst.8.jpg

I copied out center part of 4056x3040 frames with this command (and the needed conversions from/to portable anymap):

Code: Select all

pnmcut -left 1770 -top 1280 -width 510 -height 340

The 1:1 cut out parts show micrometer on top of shard (black nearly full circle and 100 divisions 1mm long line in center), with shard superglued to white cardboard superglued on two-axis sliding-table.

F=2.8 is brightest:
tst.2_8.jpg.jpg
tst.2_8.jpg.jpg
tst.2_8.jpg.jpg (14.62 KiB) Viewed 1800 times
F=4:
tst.4.jpg.jpg
tst.4.jpg.jpg
tst.4.jpg.jpg (13.28 KiB) Viewed 1800 times
F=5.6 (top) and F=8 (bottom, very dark); only three attachments allowed per post, used "pnmcat -topbottom" to join both:
tst.5_6.8.jpg
tst.5_6.8.jpg
tst.5_6.8.jpg (20.03 KiB) Viewed 1800 times

Looking at micrometer black circle, F=4 is sharper than F=2.8 image, and F=5.6 is sharper than F=8 image.
Comparing F=5.6 with F=4, I would say F=5.6 is sharper, but am not sure.

I think the "brightness problem" shown in the captures exists only inhouse, outside even F=16 would give nice frames.
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/working_with_FPGAs

CanPi
Posts: 64
Joined: Wed May 20, 2020 12:21 pm

Re: Raspberry Pi High Quality Camera

Fri Jun 26, 2020 4:42 pm

Thanks for doing this Hermann.

Assuming Luminance from the scene stays the same you can/should compensate for the decreasing Exposure by increasing Exposure Time (double it with every additional f/stop). Most lenses need to be refocused after changing aperture and I think this one is no exception. The effect is called Focus Shift.

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

Re: Raspberry Pi High Quality Camera

Fri Jul 03, 2020 7:42 am

I did capture 2.3km distant "Ohrsbergturm" with 35mm lens (10° FOV H) and 70mm lens (3.98° FOV) before:
HermannSW wrote:
Sat Jun 06, 2020 3:34 pm
The 1:1 copy out of from 12MP photo captured with just "raspistill -o tst.png" is amazingly clear, much better than with the 70mm lens. And because of 35mm vs. 70mm focal length it is half the size. I really like this 35mm photo details over 2.3km distance!
(6MB 12MP photo: https://stamm-wilbrandt.de/en/forum/tst.35mm.jpg)
Image
HermannSW wrote:
Wed May 06, 2020 6:14 pm
I copied out 1:1 just the Ohrsbergturm from full 12MP photo, impressive details for 2.3km distant:
Image

Yesterday I learned that I can put a 50X smartphone zoom lens in series with 35mm camera.
Although real magnification is 8.1× really, I am happy for what I got as 14$(!) only zoom lens, resulting in 1.24° effectively!
viewtopic.php?f=43&t=278860&p=1689478#p1689478

So this morning when I went to bathroom I stopped, went back and moved my WoodenBoardPi with HQ camera and 35mm lens as well as zoom lens to bathroom:
20200703_083336.15%.jpg
20200703_083336.15%.jpg
20200703_083336.15%.jpg (54.81 KiB) Viewed 1554 times

I was totally happy with what I got, looked at magnification only for now. I am sure I can do better with other aspects of the photo. This is full size 6.2MB 12MP photo shot:
https://stamm-wilbrandt.de/en/forum/ohr ... m.zoom.jpg

Here is 100% cutout from that photo, just the Ohrsberturm -- it is 2.3km distant from HQ camera with 35mm lens with zoom lens in series:
cut_out.100pc.jpg
cut_out.100pc.jpg
cut_out.100pc.jpg (111.93 KiB) Viewed 1554 times

P.:S
Tonight in series lenses will be directed at moon; moon might cover 70% horizontally and 93% vertically of 12MP HQ camera photo:
viewtopic.php?f=43&t=278860&p=1689767#p1689767

P.P.S:
Did capture moon with lenses in series (50$+14$=64$) setup.
Got some nice photos/videos, but of course not comparable to what you get with a 1000$ lens:
viewtopic.php?f=43&t=278860#p1690229
(1700x1700 copy out from 12MP photo, scaled to 40%)
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/working_with_FPGAs

User avatar
jbeale
Posts: 3716
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Raspberry Pi High Quality Camera

Thu Jul 09, 2020 10:40 pm

Today I have received a f=12 mm M12 lens I ordered from 4klens.co over a month ago. It claims to be a 10 MP 1/1.8" format lens, intended for GoPro cameras. It comes with a IR-cut filter on the rear element, which I guess is redundant if used with the Pi HQ camera having its own filter. I added a photo of the lens, and a HQ camera image taken outdoors using the lens, to the bottom of my Google Photo HQ cam page at https://photos.app.goo.gl/nRtHb8SZJcTgYJ5v9

HQ photo using this lens: https://photos.app.goo.gl/xzKjcvejsLXK84Fi8 (you probably have to click on the photo and then use the "+" icon to zoom in to see the full resolution.)

The lens has nearly as much blue fringing around highlights as a much cheaper eBay M12 lens (marked 12mm 5MP 1/2.5"), but the new lens does show somewhat better resolution, particularly off-center. Whether it was worth the $60 price is another question.

User avatar
jbeale
Posts: 3716
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Raspberry Pi High Quality Camera

Mon Jul 13, 2020 7:46 pm

Two versions of the same image from the M12 f=12mm lens mentioned in my previous post: a rescaled 12MP full-frame image
CAM10_1594646037_bunny_resize.jpg
CAM10_1594646037_bunny_resize.jpg (95.95 KiB) Viewed 1239 times

and a 100% crop of the lower center frame showing a rabbit.
CAM10_1594646037_bunny-crop.jpg
CAM10_1594646037_bunny-crop.jpg (110.78 KiB) Viewed 1239 times
It is not entirely crisp, but I suppose not too bad. The misc. junk visible to the sides of the path are two IR beam-break sensors to trigger the HQ camera, using raspistill with the --signal option.

User avatar
jbeale
Posts: 3716
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Raspberry Pi High Quality Camera

Fri Jul 17, 2020 3:50 pm

Another from this morning, using the same HQ cam + 12mm lens as in my previous post. Coming right at you!
July17_3deer.jpg
July17_3deer.jpg (131.48 KiB) Viewed 1083 times

Return to “Camera board”