SVCam Setup and Testing

Setup

Remote into the Minicomputer

Setup Tailscale (a piKVM)

  1. @Priya Jakhar needs to send you an invitation to your email

  2. Once the invite has been accepted, create an account with your github account

  3. Follow the on-screen instructions to setup tailscale

Connecting to the Minicomputer

  1. Once you’re tailscale account is setup, go to your dashboard and you should see your account and the benchbot account.

  2. The benchbot account needs to be “connected”, indicated by a green bullet

  3. Then copy and paste the mini computers IP address into a new browser window address bar.

  4. You need to sign into the KVM using a username and password and then sign into the mini computer “benchbot” user with another password. These 2 passwords should be provided to you privately.

To take an image from the mini-computer

  1. Open up a browser on the mini computer and copy and paste this into address bar:

localhost:5000/image
  1. You should see an image appear in the browser window

Flash Setup

  1. Set up the flash with the desired settings, as settings influence the flash duration. My assumptions are:

    1. Manual mode

    2. 1/1, 1/2+0,3-0,6 or 1/2 flash power level

    3. Not sure about "stable color temperature" and it's impact to the frequency at which the flash can fire.. Should be tried out. We'd like a constant color temperature, but not sure what the downside is here, since it's not turned on always.

      1. stable color temperature should be on

    4. "stand by" should be turn off, or set to something like 120 min.

    5. "Delay flash" should be turn off

    6. Modeling lamps should be turned off

    7. Observe the flash duration time t=0.1. This is presumably done with the "TIMES" function of the flash.

Camera Setup/Config

  1. Turn off all auto settings.

    1. This includes exposure times, gains, white balancing, etc.

  2. Set exposure time to half of t0.1 from the flash. Pay attention to difference in units.

  3. While you have a non-changing level of ambient light:

    1. Capture a series of images with a varied camera-set delay between flash trigger and image exposure. The entire scene has to stay constant.

    2. If the images are overexposed in this experiment, modify the aperture on the lens accordingly.

    3. Note the delay that resulted in the brightest image and put that delay into the camera.

  4. Color and focus calibration.

    1. Place a color checker below the camera, preferably the big one. If the camera cannot move in the z-axis, place the color checker 15 cm above the pot soil level.

    2. Refocus the camera to ensure that focus is accurate. This is done with the color checker by zooming in on the millimeter markers. Open up the aperture all the way and repeatedly make tiny adjustments -> image capture -> zoom in and evaluate until focus is just right.

    3. Reset the aperture to an appropriate level based on the brightness of the image at the designated flash power.

    4. Capture a good quality image of the colorchecker to be used for color calibration (specifically to determine the color calibration matrix used for DNG-formatting of the images)

To determine the effect of the stable color temperature, it makes sense to run a stress test with and without it at our desired flash power. That would also help answer whether the flash will bottleneck the bbot at the given power level (edited) 

Protocols

Camera Testing Protocols: Bbot Version 3.1

Setup

  1. Camera Placement:

    • Position the camera lens 170 cm (+/- 5 cm) above the pot surface.

    • Allow the camera to move up (along the z-axis) as plants grow taller.

  2. ColorChecker Placement:

    • Place the primary ColorChecker card 15 cm above the pot surface.

    • Use a secondary smaller ColorChecker card at pot level for focus confirmation.

Initial Camera Configuration

  1. Aperture:

    • Set the aperture to the lowest number (f/4) for initial focus adjustments.

  2. Focus Adjustment:

    • Adjust focus carefully until the millimeter scale on the ColorChecker card is extremely sharp. Adjust in millimeter increments for precision.

    • Once the ideal focus is achieved, secure the setting using the set screw.

  3. Exposure and Flash:

    • Gradually adjust the exposure and flash power to achieve proper lighting.

    • Suggested settings:

      • Exposure time: Start at 250 μs. Adjust as needed.

      • Flash power: Increase as aperture values rise.

Refining Settings

  1. Aperture and Exposure:

    • Increase the aperture to f/10, then modify it up or down as needed for proper exposure.

    • If images appear too bright, increase the aperture to f/11 or f/12.

      • Note: Higher f-numbers generally improve image quality up to a point but can degrade quality at extremely high values.

  2. Depth of Field:

    • Aim for an aperture near f/12 or f/13 for optimal depth of field, which increases by approximately 25% at these values.

  3. Strobe Delay:

    • Test strobe delays at 50, 100, 150, and 200 μs, keeping the exposure time constant at 100 μs.

    • If the image is too dark:

      • Lower strobe delay to 25 μs or 0 μs.

      • Adjust exposure back to 250 μs if necessary.

Troubleshooting Focus

  1. Secondary ColorChecker (Pot Level) Out of Focus:

    • Increase the aperture to f/13.

    • Set the flash to full power.

  2. Underexposure:

    • Increase exposure time, flash power, or both.

    • Consider raising the f-number slightly (closer to f/12 or f/13) while adjusting exposure and flash settings.

  3. Focus Challenges:

    • If the small ColorChecker remains out of focus, adjust the gain incrementally until clarity is achieved.

Key Considerations

  • Maintain Height Consistency: Keep the camera at 170 cm above the pot top unless plant growth necessitates adjustments.

  • Avoid Overexposure: Be cautious with flowers and wet pots, which are prone to overexposure.

  • Lighting and Exposure: Proper balance between aperture, flash, and exposure time is critical to avoid overly bright or dim images.

Color Correction

Protocol for One-Time Configuration

This protocol outlines the steps for the one-time configuration required to process images collected with the Bbot V3.1 system. This configuration process involves generating a .pp3 configuration file that will be used for future batch processing.


Step 1: Image Collection

  1. Collect images using the Bbot V3.1 system.

  2. Make sure camera, flash, and bbot settings are correct

  3. Ensure metadata is recorded with each image, including:

    • Exposure time

    • Aperture

    • Location

    • Date and time

    • Thumbnail

    • Camera height (z-axis)


Step 2: Convert RAW to DNG

  1. Convert the RAW files from the image collection to DNG format using a suitable tool (e.g., piDNG or similar).


Step 3: Demosaicking

  1. Perform demosaicking on the RAW images if required, to prepare them for color correction.


Step 4: Calculate Color Correction Matrix

  1. Using a representative subset of the images:

    • find the corresponding RGB values in RawTherapee using the color picker and “change foreground” tools

    • Calculate a color correction matrix to ensure accurate color representation during processing.

    • Make sure the image is not overexposed (verify using the RawTherapee histogram)


Step 5: Adjust Image Parameters in RawTherapee

  1. Import the DNG files into RawTherapee.

  2. Perform the following manual adjustments:

    • Exposure compensation: Adjust exposure levels for uniform brightness.

    • Lens correction: Correct lens distortion.

    • White balancing: Adjust white balance to ensure accurate colors.

    • Gamma correction: Modify the tone curve to optimize brightness and contrast.

    • Sharpening: Enhance image details.

  3. Verify the adjusted settings by visually inspecting the images.


Step 6: Save Configuration File

  1. Save the adjustments made in RawTherapee as a .pp3 configuration file.

    • Ensure this file captures all the applied adjustments.

    • Name the file appropriately to reflect its purpose (e.g., default_processing.pp3).


Step 7: Validation

  1. Test the .pp3 configuration file on a few images to ensure consistent and accurate processing.

  2. Make further adjustments to the configuration file if necessary.


Step 8: Finalize the Configuration

  1. Once validated, store the .pp3 file in a secure and accessible location for use in the automated batch processing pipeline.


Manual Gamma correction:

  • not recommended, useful if we want to quickly process images to test autosfm

OpenCV Python: LUT for 16bit image? (quick and easy gamma correction, not ideal for longterm workflows)

SemiField Image Acquisition(3).jpg
Workflow for one-time configuration and processing of raw image data from BBot V3.1 image collection using the SVCam. It includes steps such as converting RAW files to DNG, demosaicking, creating color correction matrices, and adjusting image parameters (e.g., exposure, white balance, sharpening) in RawTherapee to generate a .pp3 configuration file for future image processing with some stages requiring manual intervention.
SemiField Image Acquisition(4).jpg
Automated process for batch image processing starting from the Bbot V3.1 image collection using the SVCam. Key steps include converting RAW files to DNG format, applying a predefined .pp3 configuration file for parameter adjustments (e.g., color correction and white balance) using RawTherapee's CLI, and generating 8-bit JPG files for evaluation. The evaluation step ensures correct white balancing.

 

Date

 

Lens height above ground

Lens height above pot surface

Focus

Aperture

Exposure

Flash Power

Pot Height

Rough Horizontal FOV

Date

 

Lens height above ground

Lens height above pot surface

Focus

Aperture

Exposure

Flash Power

Pot Height

Rough Horizontal FOV

2024-12-02

 

 

1.70

21

f/13

400

1/1

 

 

2024-11-27

 

 

1.70

21

f/10

250

1/2

 

 

2024-11-25

 

1.69cm

1.45 m

21.5

f/4

 

1/32

24 cm

48-in

2024-11-18

 

 

1.66 m

21.5

f/4

1

1/32

 

 

Camera Settings Definitions

Setting

Description

Setting

Description

Aperture

Aperture refers to the opening in a camera lens through which light passes to reach the camera sensor. It is measured in f-stops (e.g., f/1.8, f/2.8, f/5.6). Lower f-stop values (e.g., f/1.8) mean a wider aperture, allowing more light in, while higher values (e.g., f/22) narrow the opening, letting in less light. A wide aperture (low f-stop) creates a shallow depth of field, blurring the background and focusing on the subject. A narrow aperture (high f-stop) results in a deeper depth of field, keeping more of the scene in focus.

Focus

Focus determines the sharpness of the subject in the image. When the subject is in focus, it appears sharp and clear, while elements not in focus appear blurred. Manual focus allows you to control which part of the scene is sharp.

Exposure Time

 

 

 

  • Aperture and focus done manually on site

  • Exposure setting configured in the .txt file

Resources

SVCam

model

MP

Pixel resolution

Sensor

Sensor Size

FPS

Chroma

Mount

Interface

model

MP

Pixel resolution

Sensor

Sensor Size

FPS

Chroma

Mount

Interface

shr661CXGE

127.6

13392 x 9528

IMX661LQA / Sony

56.73mm (Type 3.6)

8.2

color

M72x0,75

10GigE

Flash

As of 2024/11/15 only NC has this flash

Lens

  • Linos Inspect XL 60mm (link)

Color Checker Chart

  • XRite ColorChecker calibration data sheet -