#Macro Focus Linear Capture

1 messages · Page 1 of 1 (latest)

sour mica
#

Hey Now! I've dug back into my linear capture setup, with Python on Raspberry Pi handling motor controllers, camera, and rough quilting. I'm working on a total refactor of the naive code to slightly less naive, but my background is in digital imaging & not at all in code. Here's a current rough quilt for fun - I'll fine-tune the convergence next week at the library.
https://blocks.glass/lichenshare/02d9d8e5-655f-42d4-9dec-4fbc1942ea9e

flint grove
#

sorry, I wanted to come to AWE but my family was visiting and the timing was too close

sour mica
# flint grove that's nuts!!!

Thanks! This capture is from an ArduCam 64MP sensor, in binned + summed mode uncropped, with stock focus-controlled lens behind BeastGrip Pro Macro lens. The motor controllers are discrete microcontroller + stepper motor driver boards, currently connected over WiFi as their UART details aren't documented. Python controls the camera through picamera2 and pastes the captured views into a quilt. Having this tool has made it much easier to experiment & dial into sweet spots.

sour mica
#

Here's a rough converge of a more even focus plane.
The previous quilt shows significant distortion at the extents, due to the macro lens. The texture & depth range of the cloth in this image help to hide some of the distortion as noise. Vertical alignment (not yet implemented in rough convergence) will also help.
https://blocks.glass/lichenshare/e6d6a547-27f0-4dae-8190-9f38cb23c885

rose schooner
#

are you using like a photo rail or something?

sour mica
# rose schooner are you using like a photo rail or something?

Yes, I'm using a motorized rail, based on designs & parts from OpenBuilds, controlled by WiFiStepper 8266+PowerStep01 from CrowdSupply. WiFiSteppers are controlled by REST through Python on Pi.
For macro photography in particular, precise travel between shots makes a big difference.

rose schooner
#

its surprising to me that the linear rail causes the weird distortion. When I programmed our photo rail software I didn't run into this but I was also working at a much larger scale, I think the total rail distance I was using was like 90 cm

sour mica
#

The distortion is mainly due to the wide angle of the stock motor-focus lens on the ArduCam sensor, compounded by the macro lens. A much more common lens stack would include a base lens with a much longer focus.
Without the macro lens, I don't particularly see distortion with travel ~365mm (the extent of my 500mm rail/screw)

#

Currently I'm also using the sensor at full uncropped resolution (binned & summed), so I'm using significantly more of the frame (top & bottom) than most macro workflows.

rose schooner
#

ah ok, that makes sense, I wonder if you could unwarp it using opencv or something

sour mica
#

I'm looking at moving from opencv to scikit-image for some of those functions.

sour mica
#

I'm getting much less horizontal distortion from a shorter travel distance using less of the sensor width. Here are a few current takes of stones lent by a friend, still with rough horizontal & no vertical convergence. Once the weather permits, I'll put in some time at my library's makerspace on an x64/altDP box for Triaxes 3DMasterKit for fine convergence & LKG Bridge for preview.

sour mica
rose schooner
#

ah, thats cool! I wonder if you could use this to improve the tracking used to estimate camera poses for splats and stuff