Weed detection grid does not honor camera offset (Actually stale images)


#1

It was raining here a bit, but I’ve still wanted to play with farmbot, so I decided to calibrate the camera and work on getting a head start on a weed detection regimen started.

I’ve got the camera calibrated and started to take pictures. The first thing I did was, click on a plant in farm designer, move farmbot to that plant, and take a picture. The initial result placed the photo on the farm designer map, but the actual plant site was not aligned with the plant icon. Therefore, I played with the camera offset until the two lined up. Then I constructed a sequence to move in a grid pattern and execute farmware “plant-detection”. The resulting image overlay in the farm designer map was pleasant, the watering sites aligned with the plant icons, but the open cv rendered grid / green plant circles were not aligned with the actual plant sites. You can tell this from the image based off the “rendered graph line” and the one in farm designer below it. It appears that plant-detection is not taking the offset into account when drawing the overlay, but, I am curious if I am doing it wrong and am not actually calibrated properly. My camera calibration offset is {x: -100, y: 130}


#2

Not sure we mean the same offset, but in my case (stock farmbot) camera offset in calibration is 50 x and 50 y axis. I have plants locations aligned well on the plant bed…


#3

Ah Ha! The issue I was experiencing is that I adjusted the offset after the original set of images was taken. Once I ran a new routine, the images were replaced with ones that had a properly rendered grid and plant circles.


#4

The documentation does not says what is the camera offset ?
Is it the distance from the camera to the tool center (x+10mm, and y+10mm), or the distance form the origin at the time the picture is taken ?

Both those distances are known (the position x,y,z of the farmbot, and the position of the camera related to the tool center, which is a constant), so why one has to input the offset ?


#5

The camera offset is used to align images taken by the camera with FarmBot’s coordinate system. The value includes the distance from the UTM center to the mounted camera, but also other includes other camera setup variations. A default value is provided that can be adjusted to match images with the grid for a specific setup.


#6

Sorry, but your response is unclear.
What are these default values ?
My bed garden is 300x148 as explain in the doc, so X,Y offset should be few millimeters depending on the precision of my bed-garden, a fixed distance from which point ?

Moreover, there is no easy way to delete images. A REST DELETE /images/ should be possible through the farmbot app…


#7

The camera offset is usually around 50-100mm, which is around the distance from the UTM to the camera, as mentioned earlier. The default value is (50, 100). It is independent from bed size (3000x1480mm in your case), and should be adjusted by comparing locations in the Farm Designer to the image overlay. There are several examples of calibrated values in this thread.

At this time only one image can be deleted at a time from the Web App. We will consider adding a delete all images feature in the future.