Macro lens + camera for Raspberry Pi

Published by denbigh1974 on

Home Forums Cameras Modules for Raspberry Pi 8MP IMX219 V2 Cameras Macro lens + camera for Raspberry Pi

Viewing 11 reply threads
  • Author
    Posts
    • #22312
      denbigh1974
      Participant

      Hi. I’m new to image capture using the R-Pi so wondered if anybody could advise me on the following application, please?

      I wish to use the R-Pi to capture still images of a fingerprint at the tip of my index finger (either monochrome or colour. Leaving aside the lighting aspect of this application for the moment, I would like to identify a R-Pi compatible camera sensor + lens that can do this (or at least get as close as possible). Please can anyone suggest a lens I can buy that will connect to the R-Pi?

      I imagine that I need a lens with a decent magnification to pick out the fingerprint swirls? Fixed focus is fine – I can move my finger close or far until it is in focus, but ideally I would like the focal point to be about 40-60mm from the front of the lens. This gives me enough depth to light the scene.

      Thank you

    • #22321
      Tiao233
      Moderator

      Hi! There are several issues I need to mention:

      (1) About the magnification: We prefer using “Field of View” over “Magnification.” A digital photo could be zoomed in and out on a screen of any size, so it’s hard for us to give a strict definition of how much it’s magnified. Field of View, on the other hand, defines the area of the scene you want to capture, and is usually expressed in the degrees of angles.

      For example, Let’s assume the fingerprint of your index finger is 20mm wide, you want the fingerprint to cover the whole picture’s width, and you are shooting the picture from 40mm away. From that setup we will be getting a triangle with a bottom width of 20mm and a height of 40mm, which leads to a Horizontal Field of View (HFoV) of 28 degrees. From 60mm away, it will be 19 degrees to cover the whole fingerprint with 20mm width.

      (2) The focus issue: Actually most fixed-focus (FF) cameras are focused to infinity with a limited minimum object distance (M.O.D). For example, the official Raspberry Pi cameras claims to offer a focused viewing distance of 1m to infinity.

      Since you are talking about shooting from 40-60mm, what you are possibly looking for is a camera whose lens focus could be tuned – in other words, adjustable focus – because you cannot “move finger close or far until it is in focus” on a fixed-focus camera.

      Adjustable focus comes in two types : Manual Focus (MF) and Auto Focus (AF).

      (3) The depth issue: The depth of field (DoF) of a picture is at its maximum when focused to the furthest, so when you re-focus the camera to a closer object, the depth of field drops. When it comes to a 40mm level, the depth will be really shallow.

      (4) The Distortion issue: Most embedded camera lenses come with optical distortions, except that the low-distortion lenses produce minimum distortion.

       

      If you’ve read through the explanations above, here are some more details that I need to know:

      a. Do you need your fingerprints to cover as much of picture as a possible, or do you accept that the fingerprint only takes a center section of the image as long as it’s identifiable?

      b. Do you have strict requirements of image distortions?

      • This reply was modified 1 month, 4 weeks ago by Tiao233.
    • #22331
      denbigh1974
      Participant

      Thank you. What a brilliant answer! I really appreciate the time that you took to educate me on the basics.

      I read through your post carefully. To answer your questions:

      a. Only the centre section of the image needs to be identifiable.

      b. I have no strict requirements about image distortion around the periphery of the central image. The undistorted central image should be equivalent to 10x10mm of fingerprint.

      Lets suppose that the ‘pitch’ of fingerprint lines is 0.5mm. I want to pick up finer detail of imperfections if possible. The image of the fingerprint should have a minimum resolution ‘Res’, say. I would like Res to be 0.01mm although this may be asking a lot.

      On field of view, going with your numbers, the lens will have a HFoV between 19 and 28 degrees. The camera sensor will capture a 2cm wide image but only the centre 1cm will be undistorted. If the camera sensor has a resolution of 12MP (4,200 x 2,800 say) then 2800 pixels will cover 2cm. This is the same as 1 pixel = 0.007mm. Therefore, that would be the resolution of the usable part of the image. Is that correct? If so I need a 12MP sensor and lens with HFoV between 19 and 28 degrees, if I understand you correctly.

      The finger will be in a fixed position so I guess that manual focus would be fine. I understand that depth of field may be a focus issue if the finger moves slightly.

      One more mechanical limitation may be that I want to fit my light source as a ‘conical hood’ at the front of the lens. So if the lens has a threaded boss (e,g, intended for a filter) that would be perfect. However, it’s not critical, I can fabricate some mechanical support to suit the application. My light source is very light weight. The camera will be fixed when capturing the image, not hand held.

      Thanks again!

    • #22520
      denbigh1974
      Participant

      If you’ve read through the explanations above, here are some more details that I need to know:

      a. Do you need your fingerprints to cover as much of picture as a possible, or do you accept that the fingerprint only takes a center section of the image as long as it’s identifiable?

      b. Do you have strict requirements of image distortions?

      Hi Tiao233, did I give you enough information to move this forward, please?

    • #22573
      Tiao233
      Moderator

      Sorry for my late reply. Your calculator of the “1 pixel = 0.007mm” should be correct.

      The RPi just drop the 12MP high quality camera bomb so every one in arducam is busy with creating new products and contents.  Do you take any interests in that – a 12MP sensor for R-Pi?  The aperture control on the C/CS mount even offers a chance to alter the depth of field. For the field of view, a 16mm lens on the IMX477 HQ camera seems very promising for your applicaition.

    • #22683
      denbigh1974
      Participant

      Thanks very much for your reply and for checking my calculation.

      The R-Pi sensor + 16mm lens is quite expensive combined and is out of stock everywhere but, in any case, I would like to explore different options. Which would be the best Arducam model for my application, please, in your opinion?

       

    • #22686
      Tiao233
      Moderator

      Can you give me an idea of your budget?

      If not the HQ camera, what fit your applications would be Arducam 16MP IMX298 or 18MP AR1820 MIPI camera modules, since the 13MP IMX135 camera module does not offer the flexibility of interchangeable M12 lenses.

    • #23032
      denbigh1974
      Participant

      Hi Tiao233 – sorry for the delay in my reply.

      My budget is around £50.

      Please may I ask if model MT9J001 is Raspberry-Pi 4  compatible? (That is, is there a library containing Raspberry Pi drivers?)

      I am now exploring the possibility of using a monochrome camera for my application instead of Bayer filter. Which monochrome camera has the best software support for use with the Raspberry Pi, please?

    • #23046
      Tiao233
      Moderator

      That depends on how you want to use the camera module on Pi 4. If you want to use it as a regular Pi cam module in the camera slot, the current answer is no, because the MT9J001 is not a MIPI camera to be connected to the MIPI CSI-2 slot. It’s not officially supported (not OV5647 and IMX219) and not supported by the Arducam MIPI camera project.  The Arducam USB camera shield is capable to adapt the Mt9J001 to USB connection on Pi 4.

      For now, the monochrome camera supported by Arducam are all global shutter cameras, which come with a relatively smaller resolution, like 0.3MP OV7251, 1MP OV9281 and 2MP OV2311

    • #23061
      denbigh1974
      Participant

      Hi Tiao233 – thank you for your fast reply.

      Please may I ask if OV2311 is available in the UK? Or can I order it direct from Arducam?

      Thanks again!

    • #23060
      denbigh1974
      Participant

      Thank you for your information. Is there a UK distributor for the global shutter cameras? or can I order direct from Arducam?

      Robotshop can sell the OV7251 and OV9281 (not in stock at the moment) but they do not offer OV2311.

      https://www.robotshop.com/uk/catalogsearch/result/?q=arducam+monochrome+raspberry+pi&order=relevance&dir=desc

      Thanks again!

    • #23066
      Lee Jackson
      Keymaster

      Hello,

      You might need to contact our sales representative at [email protected] for order-related issues.

Viewing 11 reply threads
  • You must be logged in to reply to this topic.