Pan/Tilt/Zoom (PTZ) Camera Is Finally Coming to The Raspberry Pi Thanks to Arducam

Featured

We all know that there is a CSI connector on the Raspberry Pi to facilitate the connections of a small camera to the processor, but how should we facilitate the small camera itself?

As a professional camera manufacturer and solution provider, Arducam has been obsessed with this question for the last 6 years, and came up with a lot of solutions like adding a lens mount, a switchable IR cut filter, a multi-camera adapter, autofocus control, and most recently, MIPI camera support to the camera board of OV5647 and IMX219.

Is it a perfect time to take a good break now since we have already covered most use cases? I don’t think so. Arducam never settles down, and we want to push the cameras for Raspberry Pi to the extreme.

I am glad to introduce you to our newest PTZ camera for the Raspberry Pi. It’s real PTZ with servos for directional control and varifocal lens for optical zoom, and it supports autofocus and IR cut switch control.

Here is a short YouTube video to give you an idea on this nice little camera.

What Are PTZ Cameras

PTZ is an abbreviation for pan, tilt and zoom and reflects the movement options of the camera, and a pan–tilt–zoom camera (PTZ camera) is a camera that is capable of remote directional and zoom control.

The Need for PTZ Cameras

A PTZ camera is not a still camera. Instead, it could move the camera and the lens, and that means a single camera can be used to monitor places that should be covered by multiple ones. You can save a lot of cost and time in purchasing and deploying the camera if a PTZ camera can handle the job. With its moveable lens, you will also be able to zoom the camera to see a specific area that you are interested in. To conclude, it’s “do more with less.”

PTZ Cameras Are Expensive, But the Raspberry Pi Ecosystem Is Not

A PTZ camera is usually expensive than the other surveillance cameras. This is what it looks like when you search PTZ camera on Amazon:

Search Results of “PTZ camera” on Amazon

Arducam makes cameras, and we’ve made a lot of cost-effective ones for the Raspberry Pi. The whole idea about Raspberry Pi is “low-cost, high-performance … that people use to learn, solve problems and have fun. ” This is also the idea we are having here. It would be great if we can offer a cost-effective PTZ camera on the cost-effective Raspberry Pi.

Arducam R&D, Reliable Suppliers, and Informative Customers

Arducam has good relationships with both suppliers and customers.

On the one hand, Arducam works closely with all kinds of suppliers, especially those in optical lenses, to achieve better optical performance on our camera boards. The first time we got our hands on the newest varifocal lens from our supplier, we started to think that whether we could integrate this stuff with a raspberry pi camera project, and make a PTZ camera out of it.

On the other hand, we have a group of customers that really enjoy our product and services, and they will always give us new ideas on our products and push us to keep going forward until we surprise them with another new product. We’ve heard a lot of suggestions and proposals from our customers in this PTZ camera project, which really inspires our engineers. Without them, it would be much harder for us to present you with a PTZ camera for Raspberry Pi with optical zoom, autofocus control and switchable IR cut filter.

Possibilites

Although we have released this PTZ camera for Raspberry Pi as a new product, we still think that it’s more like a window to new possibilities. Customers will be able to make greater projects with this camera, such as adding image processing and recognition to the system so that the camera will be able to track and follow an object, and then zoom in to get the details.

Please let info@arducam.com know if you are interested in or have great ideas about this PTZ camera.

Use Almost Any MIPI Camera Module on Raspberry Pi

Featured

THE RASBERRY PI CAMERA PROBLEM

On May 14, 2013, the Raspberry Pi foundation announced the release of the first camera module board (5MP OV5647) for Raspberry Pi. Three years later, the V2 camera (8MP IMX219) was out with upgrades in resolution and image quality. Together with their NoIR siblings, we only have four official camera modules in total.

For years, the Raspberry Pi foundation has lacked broad camera connectivity and camera driver support., and we are all stuck with two image sensors: 5MP OV5647 and 8MP IXM219. Admittedly, those two have decent image signal processing together with JPEG/H.264 encoding, and cover most of the low-end applications which only require a reasonably good picture or video streaming.

Clearly the restriction of official standard camera modules has limited Raspberry Pi imaging projects to a narrow range of performance and features.

WHAT IS MISSING

Machine vision applications, such as robots and self-driving cars, may require cameras with a global shutter. The global shutter avoids the rolling artifacts when the object is moving at high speed, so it is crucial for image processing such as object recognition, detection, and tracking. On the other side, rolling shutters on official Raspberry Pi camera modules produce images that are blurry enough to lose this competition.

For scientific applications, sensors with high sensitivity outside the visual spectrum, such as in the IR or UV frequency bands, are required, and many times only need RAW data acquisition. For a multi-camera system, like a 3D scanner application, all the cameras have to be synchronized to each other, usually by means of a hardware trigger. Other users simply need higher resolutions than the current 8MP camera for still image capture.

The current 5MP OV5647 and 8MP IMX219 camera modules have become a handicap for the whole Raspberry Pi ecosystem and a barrier around its possibilities.

PROBLEM SOLVED

While the Raspberry Pi foundation is satisfied with the current situation, Arducam steps forward to enable advanced applications.

The Arducam team has worked hard in the past few years to solve the technical issues, and now we just released a low cost, high-performance camera board for the Raspberry Pi platform, enabling users to connect most MIPI camera modules directly to Raspberry Pi’s native CSI camera port. The Arducam drivers for these cameras are V4L2 friendly, and support basic video mirror/flip and manual exposure/gain settings. In short, this offering from Arducam enables industrial quality cameras to be paired with low cost processors, and will bring many new machine vision applications to life.

Note: Now the camera drivers are moved to the userland SDK (github link), V4L2 kernel driver will not be updated or supported unless explicitly required (customized work might be required. RFS = Request For Support. ). All camera drivers are designed and maintained by Arducam team.

The following is a non-exhaustive list of newly added camera modules for Raspberry Pi.

Image SensorOV7251OV9281IMX135IMX298
Resolution0.3MP
640×480
1MP
1280×800
13MP
4208×3120
16MP
4656×3499
Full Resolution
Frame Rate
100fps60fps
(@1-lane MIPI)
10fps10fps
Color TypeMonochromeMonochromeColor Bayer FilterColor Bayer Filter
Shutter TypeGlobalGlobalRollingRolling
Output Format8bit Gray8bit GrayRAW/YUV 4:2:0RAW/YUV 4:2:0
V4L2 SupportRFS*RFS*RFS*RFS*
Exposure ControlManualManualManualManual
Gain ControlManualManualManualManual
Focus ControlFixedFixedProgrammableProgrammable
Mirror/Flip ControlSupportSupportSupportSupport
JPEGSupport Support Support Support
H.264 EncodingSupportSupportSupportSupport

Video Demo

Here is a video demo with the monochrome Global Shutter VGA MIPI camera Module OV7251.

This demo is based on old V4L2 camera driver, we will update the new userland camera driver demo very soon.

Go with Arducam

You can contact Arducam for more information: sales@arducam.com

New Arrival: Arducam’s New Low Distortion Lenses

Featured

In our last post of the new M12 Lens Kit, we introduced a variety of lenses that will cover most of the use case scenarios. However, “most” is not enough, and we want to take a step forward to face bigger challenges. Today we are glad to add several new low distortion lenses to our product family.

Seeing is believing

One of our low distortion lenses

To put it simply, the broader Field of View (FOV) you need, the easier you will have distortion. Because with more details captured, you’ve got to find a way to squeeze all the information onto the image sensor. The optical design decides that you will face this “lens error.” After all, it’s hard to think of another method that allows you to shot 180 FOV without bending the image to a sphere.

When we use cameras to take pictures, we are capturing the light and squeezing it onto the sensor frame, so technically speaking, we have not reproduced the object, but instead, imaged it.

Straight Forward

If you are using our cameras for surveillance, it would be okay to have those distortions, and the fisheye effect is even somehow aesthetically interesting. However, if the image is for the computers and microcontrollers to process, you will want it to be as accurate as possible. We can use an algorithm to restore the degradation of the image, but industrial cameras that can correct and restore the distortion is actually not cost-effective. Why not reduce the distortion at the beginning with a low distortion lens? That will make life a lot easier.

Look ahead

As the distortion is a “lens error,” we will need lenses to handle this error. The optical design of those zero distortion cameras is different and efficient enough to present you with what the image really is. We’ve tested one of the lenses on an OV5647 sensor, and you can see from the pictures below about the clear difference between the low distortion lens and the normal ones.

70 Degree HFOV lens with distortion
70 degree HFOV lens with low distortion

Here are the newly arrived low distortion lenses:

PN

EFL

Format

H-FOV

V-FOV

D-FOV

Distortion

 

 

 

1/2.5”

1/4”

1/2.5”

1/4”

1/2.5”

1/4”

 

M2504ZH05S

4

1/2.5”

75

45

60

33

96

55

3%

M25360H06S

3.6

1/2.5”

90

55

75

41

120

68

3%

 

 

 

1/2.7”

1/4”

1/2.7”

1/4”

1/2.7”

1/4”

 

M27280M07S

2.8

1/2.7”

110

74

85

55

125

92

<1%

 

 

 

 

1/4”

 

1/4”

 

1/4”

 

M40210M09S

2.1

1/4”

 

93

 

70

 

110

<1%

M40320M06S

3.2

1/4”

 

64

 

51

 

85

<1%

Arducam M12 Mount Lens Kit for Raspberry Pi and Arduino Cameras

Over the past few years, Arducam has launched many camera boards for Raspberry Pi with M12 or CS mount lens holders. One of the many features that outperformed the official ones was the interchangeable lenses, a feature also on our SPI cameras for Arduino. We are excited to announce that the Arducam M12 Mount Lens Kit for Raspberry Pi and Arduino Cameras has already been on sale.

The new lens kit that we have carefully prepared for you

The new lens kit that we have carefully prepared for you

The lens kit has 10 M12 Mount lenses that we have selected from a wide array of lens options, and the Horizontal Field of View (HFOV) of those lenses from 10 to over 200 degrees (on a 1/4-inch RPi cam or Arduino cam). It comes with labeled caps, four lens holders, a lens cleaning cloth and screws, which allows you to select and change for the best lens you need.

Pi Cam – Optimized Optical Performance

The official RPi camera module has permanently attached lenses which could not be changed, so whether you are satisfied or not, you are stuck with what comes from the factory. Sometimes you may want extremely closeup macro photography or a wider field of view, but you just can’t with the official ones. On the other side, Arducam-designed camera boards with interchangeable lenses extend the capabilities and flexibilities of Raspberry Pi and Arduino camera, and you can finally have better control over what gets into the frame of the images and videos.

Lens kit that thinks for you

To meet the increasing market demands for more lens options to address different use cases, Arducam selected and tested a wide range of M12 optimal lenses from long focus to fisheye for shooting on your Raspberry Pi or Arduino cameras. We have also labeled every lens on its cap, provided multiple lens holders and a piece of length cloth. It is now much easier for you to get the best lens you will need, and we will keep the lens list growing.

We have thought in advance about what you might need

We have thought in advance about what you might need

That is the part we have put in the box. Aside from that, we have made a PDF document that contains the details specifications of each lens, and a video that shows how to replace the lenses on Arducam Cameras.

An overview of the specifications of those lenses

An overview of the specifications of those lenses

To the top

To test what a Raspberry Pi can shoot with our lenses, we decided to take a field visit to the rooftop of one of the tallest building here so that we can capture the view of this city. We’ve also planned a trip to the bookstore. Here was what we brought with us:

  1. A Raspberry Pi Zero W with SD card.
  2. A power bank to supply 5v power to the Pi zero
  3. An Android phone with our app preinstalled to connect to the Pi’s hotspot for the preview
  4. Some tapes and elastic bands to hold the setup steady
  5. Our M12 Mount Lens Kit

Lens Kit shot by Mi A1

Lens Kit shot by Mi A1

Pi and Cam shot by iPhone 6S Plus

Pi and Cam shot by iPhone 6S Plus

Wait and see

After we went back from downtown, we pulled the micro SD card and got the pictures out. Our designer really liked those lenses and was surprised by the picture quality. He thought there would be no need to risk climbing to the rooftop with his heavy DSLR lens anymore.

Here are some of the pictures that we’ve taken with Arducam M12 Mount lenses on an OV5647 sensor.

 

ArduCAM NOIR Raspberry Pi camera with Motorized IR Cut Filter

Background

Raspberry pi camera has both color version pi camera board and NoIR version pi camera board. So let’s take a look at the difference between these two types of camera. The color version pi camera has 650nm IR cut filter on top of the sensor, so it can only sensitive to visible light like human eyes. While the NoIR version pi camera also called IR filter removed pi camera which doesn’t have 650nm IR cut filter on top of the sensor, and can sensitive all spectrum of light including ultraviolet light and near infrared light which cannot be seen by humans. So people will think NoIR pi camera is better than the standard color pi camera, because it is sensitive to all spectrum rather than visible light. Yes, it is good, but it depends. The problem of this effect is that the color reproduction is drastically affected.
Unlike your eyes, camera sensors can detect “near infrared” light that just outside the range of the human eye. The image below shows the result.

The plants in this view reflect more infrared than green light so they appear pink in daylight.
To make the image more akin to what humans can see, most cameras are fitted with an infrared-cut filter which only allows visible light to pass through, reflecting unwanted infrared. This is where standard color version pi camera used for.

Motorized (Switchable) infrared-cut filters

There are some instances where capturing infrared light is an advantage. In low-light conditions, cameras capture as much light as possible to produce brighter images, regardless of color. For this reason, some entry-level night-vision cameras don’t feature a cut filter, instead capturing infrared light from on-board LEDs at night at the expense of true color reproduction during the daytime.
The optimum solution is to use a switchable infrared-cut filter. In daylight, the filter covers the sensor to provide color footage, while at night the filter opens for a brighter image. In industry terms, these cameras are known as day/night or true day/night cameras.
These cameras can be combined with infrared lamps which are much more discreet than conventional white-light lighting, since the light produced can’t be seen by the human eye.

Solution

Sometimes you need the camera to work on both daylight and dark (night time) conditions, like the IP-based security camera. ArduCAM pi cameras now feature a motorized IR-cut filter on NoIR pi camera board, the IR-cut can be switched on in the daylight and can be switched off at night, and cooperated with IR light source for night vision. The highlight of this motorized IR-cut mechanism is no additional cable needed between the Raspberry Pi board and camera board.

ArduCAM pi camera with motorized IR cut filter

First we have to edit the config.txt file

sudo nano /boot/config.txt

Add this line at the end of the config.txt file, save and reboot.

disable_camera_led=1

Then use our provide python script to take normal image with IR-cut on and night vision image with IR-cut off. Using the following commands there are two pictures captured.

cd piCamLed
sudo python ./RPI_camera_IR_CUT_NOIR.py
sudo python ./RPI_camera_IR_CUT_IR.py

Software Download

Demo software can be downloaded from here.

Github Repository

The Github repository for controlling the motorized IRcut filter of Raspberry Pi camera can be found here.

24 x 24mm Coin Size Raspberry Pi Compatible Board

ArduCAM team now is developing a coin size Raspberry Pi compatible compute module. The total size of the SOM is 24mm x 24mm, compared to the offical Raspberry Pi compute module and new Pi ZERO, it will be the smallest Raspberry Pi compatible module in the world. The coin size pi compute module is fully customizable and can offer the extra features that wasn’t provided by the standard Raspberry Pi boards. User can run the system on a small 36mm x 36mm adapter mother board with camera support. It is ideal for battery powered portable device lilke smart watch, action camera etc. The highlight feature of this coin size pi module, it supports dual camera interface and stereo vision which can be used in robots for machine vision applications or high definition drone camera. Contact us for more information about customization. Note it is not a replacement for Raspberry Pi boards, just a supplement for Raspberry Pi ecosystem and Raspberry Pi is a trademark of the Raspberry Pi Foundation. (This post made Raspberry Pi engineer and forum moderator very upset and they said that it will would breach the bootloader license. But thanks to Kristina Brooks work on an open source bootloader for Raspberry Pi, released under BSD and GPLv2+, and not including any “Raspberry Pi only” conditions, although it is a “poor” alternate at the time being, and a lot of fans build bare metal firmware.  said it could also end up being killed and will never see the light of day, just as what happened to ODROID-W board, but they can’t kill the spirit of hacking just for funs and keep us away from building something new. Once again I have to emphasize that it is not a replacement of Raspberry Pi boards, please order pi boards from Pi foundation. Our SOM maybe double or even triple price than standard pi boards, so this SOM is only available for someone who really need it and NDA required.) Continue reading “24 x 24mm Coin Size Raspberry Pi Compatible Board” »