Camera Calibration / Nothing happens

Hi FB community!

First of all, apologise if I’m repeating an enquiry. I’ve searched the whole forum and couldn’t find a solution.

I’m using the OS 8.2.3 on Genesis v1.4. I’m not being able to calibrate the camera correctly. I can take pictures, but the images are being shown 1) mirrored and 2) at a wrong scale (slightly smaller)

  1. I know that the mirror imaging problem should be solved by modifying the “Origin location in image” parameter, but absolutely nothing happens when I modify it. Image always shows up the same.
    It’s weird that in the Farmware tab the image shows up the right way, but I see it mirrored in the Farm Designer.

  2. When I compare the image with the two markers 10 cm apart, in the Farm Designer I can compare with the grid and they are 7 cm apart. I assume this is what the calibration is for, but I just can’t do any calibration.

I’ve followed the Camera Calibration documentation carefully and set all the parameters correct (see image)

When I try running a calibration, I press the “Calibrate” button and nothing happens. No log, nothing.
When I try scanning the image by pressing the “Scan image” button, most of the time nothing happens, and occasionally I’m getting a “Camera Calibration failed” message, but no log, no nothing. I’ve tried different lighting, more or less brightness, and I never get anything.

Could you please help me with this? Thanks in advance!

@NicoMolnar, ( again un-officially ) I think you’re seeing bugs. I don’t have a “real” bot but I do have an RPi3B+ connected to a real Farmduino V1.4 controller.

@RickCarlino, this post needs triaging also ! :slight_smile:

Oh, and this recent attempt :slight_smile: ( seems related to take-photo ? )

Hi @jsimmonds, thanks again for having a look at this!
Interesting that you are getting a similar error than the “take photo” error when running it within a sequence. I wasn’t having that issue specifically (just nothing happening rather than an error), that they might probably be related.
Hope someone from the FB team can have a closer look at this.

@connor I was wondering if the issue posted here is related to the problem identified and mentioned in this other post?

Because I am still not being able to run a calibration, not with the “Calibrate” nor with the “Scan image” button. Nothing happens in either case.

Thanks in advance!

@NicoMolnar, I have the same symptoms as you see. To my eyes, there is no “link” to that issue with Sequences that you mentioned.

I’m off to check the Doco. on how to debug Python in Farmware programs . . . seems like there’s an early exit not being reported :confused:

As a start, here’s what results when I run that CALIBRATE Farmware directly from the Linux shell :

This test might be too naive . . let me see whether there are ENV’s that are required :slight_smile:

Nope, the Python code is having trouble . . it’s all there on the Raspberry Pi serial console !

@RickCarlino, I’ll submit an issue on FarmBot-Labs plant-detection repo if you want that . . ?

@jsimmonds That would be appreciated! Thanks for your debugging / investigation of the matter.

@jsimmonds, you officially rock.

Thanks for having a look at this!
Hopefully it can be solved soon because I’m still getting my photos mirrored :confused:

1 Like

No, that’s not right . . I’m officially a rock :blush:

Opened Issue #8 in the master repo of plant-detection ( hoping @Gabriel will move it to the correct destination :slight_smile: )


The Web App has been updated to fix the issue @jsimmonds found. (Thanks!)

Changes to parameters will only affect images in the map after calibration is completed. Also, more logs may be shown by adjusting filter levels on the log page if they are not already at maximum.

1 Like

If that’s true, and my WebApp version 13B3971D matches that commit, then there’s another bug somewhere . . ( was the issue reproduced and then tested after this fix ? )

Here’s where I have just restarted the Bot and then pressed CALIBRATE in the Camera Calibration Farmware page

@jsimmonds Are you using Try changing the origin location in image parameter and running it again.

1 Like

Hi all,

Thanks so much @jsimmonds, @RickCarlino and @Gabriel for taking a look on this issue.

Good news:
I could finally run a calibration, the image was scanned and the two red markers were detected smoothly and the new parameters are automatically saved.

Bad news:
From the moment that the new parameters are saved, my photos don’t show up in the Farm Designer anymore. The reason? The new Pixel Coordinate Scale value!
I identified that any value different than 0 in the Pixel Coordinate Scale will make my photos not to show up in the Farm Designer.
Which makes it a problem with no end, because I calibrate the camera so that the photos match the grid in the Farm Designer, but I can’t visualise the photos anymore, unless I set it back to 0, which makes my photos show up, but not-to scale.

Another thing is that the photos are still showing up mirrored. I’ve tried changing the Origin location in image variable, but no change is observed.

Sorry to pester, but I hope that my feedback helps solve all the issues related with the camera calibration :slight_smile:

Again, thanks a lot to the FB team!

When the coordinate scale is set to zero (which is the case before calibrating the camera), photos are shown in the map at their location but without any adjustments applied since the calibration information is incomplete.

Once the camera is calibrated, photos are aligned with the map according to their calibration data. Photos without applicable calibration data or that are incompatible with the calibration data are no longer shown.

1 Like

Thanks ! That has helped. Was this a step which I missed in RTFM ? :slight_smile:

Thanks @Gabriel!

There’s something I’m missing here. After I perform the calibration, not only I stop seeing the photos I had taken before, but I can’t see any new photo I take after the calibration either. Shouldn’t the new photos have the new calibration data applied and hence show up in the Farm Designer?

Maybe I’m not performing a complete calibration? After I hit Scan image, I get the Pixel Coordinate Scale and Rotation values updated (to 0.8807 and -0.14, respectively, in my case), I refresh the page just in case, and when I take a new photo…can’t visualise them in the Farm Designer :confused:

If this means that I’m having photos incompatible with the calibration data…how can I fix it?

Thanks again!

@jsimmonds No, just seems like some bad data slipped through.

@NicoMolnar The new photos should be showing up. Do the z coordinates match (within 5mm) between the photo used for calibration and the new photos?

1 Like

From the FE ( WebApp ) ?

[ I am using :slight_smile: Down-Under :upside_down_face: and a recent v8.2.4-rc1 FBOS ]

I re-run a calibration trying both methods, via Calibrate and Scan image, but the issue persists.
I am making sure the z coordinates match, but still no images are showing up on Farm Designer after I perform a calibration, unless I change the Pixel Coordinate Scale back to 0 (and therefore the images are mirrored and not to scale).

Any ideas what could I be doing wrong? I’m carefully following the steps on the Documentation.
I was excited when I saw the markers being easily detected (see photo below), but now this!

Help :slight_smile:

1 Like

@NicoMolnar We found the issue; new images are uploading without all of the required data. We will release a new FarmBot OS version with the fix soon. Thank you for your patience and for providing information to help identify the problem.


Fantastic news, @Gabriel!

Thanks to you for addressing the issue straight away!