Misty Community Forum

How to focus Misty's camera when taking picture?

Hi, I am making a skill that involves extracting text from a picture. The picture is taken using misty.takePicture(). However, the picture is always out of focus. Here’s an example.

When I move it closer to the camera, it is also blurred.

How does the camera focus work? Is there any way to improve this? Thank you!

Hi @Zetzaus,

Misty’s camera is designed to be a fixed focus camera, with a focal length at infinity. In other words, she should be focusing but it doesn’t appear she is. If you take a picture through the Command Center, do you get the same result or does she end up focusing?

We did have a small batch of cameras that ended up being defective. Would you mind emailing support@mistyrobotics with your Misty type (Basic, Standard, Enhanced), and its serial number?

Hi @scott.bobbitt, thanks for the reply.

I reached out to the support team, and the camera most likely is not defective.

Taking a picture from the command center and the skill results in the same thing.

One thing that improves this a lot is by putting down the phone, meaning that the blur is heavily affected by my shaky hands. Another factor is that capturing text in a display is also more complicated than capturing text in a paper.

However, there’s this strange phenomenon that Misty loses focus after some time of operation. When the robot is turned on (after a “long” off time), the focus is at its best. After running the skill for some time, the focus reduces.

This is the image when the robot is just turned on.

This is the image after running the skill for ~15 minutes (zoom in and you can see the difference)

The skill itself is just taking a picture and sending it to a local server. Misty listens to the head front sensor. When touched, Misty takes a picture and sends it to my local server.

I have also checked that the image received by the server and the image saved by Misty in her local memory is identical.

Any idea what is the problem?

Apologies for the slow reply, and yes, this is a strange symptom. A couple of details will help to gain an understanding of what might be happening:

  • Is this result consistent, and if so, does it always occur after a particular amount of time?
  • When this occurs, what else is the robot doing?
  • Subjectively, do you notice any lighting variations when this is happening?

Interestingly, in looking at your images, the effect isn’t uniform. The COVID sign in the top part of the picture looks pretty close in both pictures. There’s a bit of a difference in the brightness of the pictures, which is likely the effect of either auto exposure or auto white balance in the camera module itself.

  • Is this result consistent, and if so, does it always occur after a particular amount of time?
    Yes, it is still happening to this day, but the image quality does not drop anymore

  • When this occurs, what else is the robot doing?
    That image is taken from the command center. The robot is idle.

  • Subjectively, do you notice any lighting variations when this is happening?
    The image is always taken from the same location, there should be no significant lighting variations.

  • Interestingly, in looking at your images, the effect isn’t uniform
    Yes, I figure out the problem now. Misty seems to have a problem focusing on objects in the center of the image. The further from the center the better. If the phone is on the top or bottom of the image, the text is readable. Shaky hands do not seem to be the problem anymore.

If you see the first message of this post, I was holding the phone in the middle of the image. Now these are the result if the phone is on top or bottom of the image.


Misty’s camera is fixed focus, so I wouldn’t expect to see any attempt to actively focus. Significant variations in the focus should exist if there were a defect in the camera lens, or perhaps if the cover glass were significantly dirty.

There are many test patterns that can be used to look for variations in focus, distortion, or artifacts. There are many, many factors that can impact visual quality, not the least of which is the medium of the subject.

Here are four images I just took, each at around one meter from the camera. Two of the images are from the same plane as the camera, and two are from an elevated position. Additionally, two are taken using an AR tag rendered on my phone, the other two use an AR tag I printed on paper.




As you can see from the images, the luminance of the phone causes some bleeding in the edges of the image. You can also see the impact of reflectivity across both mediums.

If I were to offer any suggestions, it would be these:

  • If possible, avoid trying to read from a phone. If you’ve ever used an electronic boarding pass when flying, you’ll notice that they’ve made quite a lot of optimizations in the readers just to get them to recognize 2D barcodes on phone screens.
  • If possible, avoid trying to read text. This can be done, and OCR technologies are widely available, but the conditions under which that works are quite tight, and the equipment is generally specialized. Prefer a machine readable format, like a QR code or AR tag (Misty can read both).