RasPi camera with HyperPixel and Blue Dot


#1

Hello everyone, this is Esa from Porvoo, Finland.
I have been enjoying Pimoroni products for a good while now, and I must say these are the best toys I have ever had! (I call these things “toys”, because I like to play with them, a lot :))
My dayjob as a WordPress developer takes the biggest chunk of my time, but there’s some quality time for play, and some minor time for documenting and sharing. I’m a Linux (Debian) user for over a ten years now, so I feel like home with everything Raspberry Pi.

I’d like to show you my latest camera project, built around RPi 3, a camera mount, v2 camera module, HyperPixel display, Pibow PiTFT+ case, and the inexpensive lens set, all from Pimoroni Shop:

The camera mount needed some Dremel router, (as you all know…) then a tiny drop of superglue to attach the lens screw mount, which I sawed off the clip.

As you can see, the HyperPixel display fits with the PiTFT+ case! No extra layers needed, just flip the two upmost layers:

Now, most users have certainly noticed there is no free GPIO pins using HyperPixel. No pushbutton camera then, whine! But hey, what we have here is a touch display… So, I installed Blue Dot https://github.com/martinohanlon/BlueDot
and used MockBlueDot app for controlling the local device. http://bluedot.readthedocs.io/en/latest/recipes.html#testing

I have learned some Python lately, and it was super easy to write a script that runs at bootup and takes care of RasPi camera functionality. Images could be saved into a USB thumbdrive for maximum convenience.
Here’s my script at it’s very basics:

from bluedot import MockBlueDot
from picamera import PiCamera
from signal import pause
from time import sleep

camera = PiCamera()    
bd = MockBlueDot()
camera.rotation = 180
camera.resolution = (1920, 1080)
frame = 1

def capture_camimage():
    global frame
    camera.start_preview()
    sleep(2)
    camera.capture('/home/pi/camera/frame%03d.jpg' % frame)
    frame += 1
    sleep(1)
    camera.stop_preview()

bd.when_pressed = capture_camimage

bd.launch_mock_app()
pause()

Learn more about Pi camera settings with Python: https://www.raspberrypi.org/documentation/usage/camera/python/README.md
http://picamera.readthedocs.io/en/release-1.13/

Now, how to implement the “camcorder” functionality?
http://bluedot.readthedocs.io/en/latest/recipes.html#d-pad
You could modify the script to shoot a video when top of the Blue Dot is pressed, or shoot an image sequence when left of the Blue Dot is pressed! That’s awesome! What do you think?

Yesterday was a perfect day for photography, so I went testing with the macro lens from the set:

Edit:
Focusing in macro photography, especially at field circumstances, is critical. Normally we would use our DSLR’s viewfinder and the focusing ring of the lens used (my personal favorite is Carl Zeiss Jena Flektogon closeup lens). With a camera setup like this, using fixed focus lens, the focusing happens moving the whole camera closer/further from the object. As you can see, in my script the camera preview is set to two seconds. That’s enough to get your subject in focus. Longer times will tire your arms and fingers, and may cause unsharp images.
HyperPixel provides incredibly sharp realtime preview with no lag or “stutter” for capturing even the most demanding objects, like insects on the move. I just wish the focus was on the spider’s eyes, now it’s about 0.5mm in front. The spider was about 6mm of length, from jaws to butt!

That’s all from Porvoo now,
thank you Pimoroni for the parts and components and stuff!


#2

That shot is amazing!
I’ve been meaning to get around to making my NoIR camera for ages, but I’ve not had a chance to finish it…
I congratulate you on this sir; it really is an astonishing bit of kit. :D


#3

fantastic picture indeed!

what did you use to power the camera?


#4

@TracyS, I used a 10000mA mobile powerbank with 2.1A output, hidden in my pocket.


#5

An innovative use of Blue Dot. Not the use case I envisioned for MockBlueDot but thats all part of the fun!


#6

@martinohanlon, thank you for your innovative and inspiring BlueDot software!


#7

@RaspberryPicardBox, here’s some ideas for a NoIR camera:




#8

So if I read this post correctly, you have attached the camera and the Pimoroni HyperPixel Display at the same time and it all works. If so, that would be outstanding.

Thanks,

BobbInND


#9

@bobb, there is no reason why these two basic components wouldn’t play together. It’s all about triggering the camera without a physical button, and I’ve found Blue Dot the most convenient, reliable and fun way doing so. It’s also very “hackable” using simple, beginner (like me) level Python. Totally cool for my RasPi photography needs.
I’m glad you like it :)


#10

Although the BlueDot thing is excellent, my plan is to use a motion sensor to record pictures or video’s to disk for the most part. I will need to figure out how to make it stay turned on during movement, and then turn off sometime after that movement stops.

Thanks for sharing the project.

Bobb


#11

Esa,

How did you get the camera cable out of the case with the HyperPixel attached?

Bobb


#12

@bobb, I was doing some upgrades to my camera, and opened the case. The camera cable is quite durable so you can twist and bend it to make a 90 degree turn, depending on your camera module orientation. Now you can route the cable between the Pibow layers: