-
Notifications
You must be signed in to change notification settings - Fork 5
Help CalcFgRect
firepick1 (localhost) edited this page Dec 28, 2015
·
5 revisions
The foreground bounding rectangle is useful to determine the position and orientation of a part being held by the effector SMT nozzle.
We use the calc-fg-rect.json FireSight pipeline to calculate the bounding rectangle of a foreground object. The FireSight pipeline requires a saved image at the same location without any part. The saved image is the background to subtract from the image with the part. Background subtraction removes image pixels that haven't changed, and ideally results in an image consisting only of the newly attached part. Given the newly attached part image, we can easily calculate the minimum bounding rectangle of the part, which gives:
- x the pixel x-coordinate of the center of the bounding rectangle
- y the pixel y-coordinate of the center of the bounding rectangle
- length is the size of the longest side of the part bounding rectangle in pixels
- width is the size of the shortest side of the part bounding rectangle in pixels
- angle the CW angle in degrees of the longest side of the part bounding rectangle from horizontal
- points the number of pixels in the part image
Background
Foreground
CalcFgRect
- x 323.471
- y 65.7342
- width 30.5843
- length 145.516
- angle 2.2457
- points 1775