Made setup using laser cut levels:


First time around, I used a Raspberry Pi 3B+ with camera module V2. This to see the quality of footage. Used a marker to draw a red dot on the skin layer. Made sample code to calibrate and focus camera.




Want to add a light source later, maybe also switch top for plexi to allow more light to reach dot. Then started with code to trace the movement of the dot. The last image uses an iPhone camera lighting from the side.
To do:
from picamera import PiCamera
from time import sleep
camera = PiCamera()
Camera.strart_preview()
#Test for video, later removed for images. It was tried because the location was unclear.
try:
camera.start_recording("/home/karolineaune/Desktop/video.h264")
sleep(5)
camera.stop_recording()
camera.stop_preview()
except:
sleep(5)
print("It did not work")
camera.stop_preview()
camera.capture("./focusingX.jpg") #Switched X for which iteration it was. First iterations are not captured with camera. |