loading

Add to this Thread


Steven Gentner from United States 7 year
Muhammad,

The box size is based on a percent coverage of pixels. The algorithm starts at the COG with a very small size (3x3) and calculates the percentage of on pixels within that box as compared to the number of on pixels in the image. If the percentage is less than desired, the box size is increased in all dimensions by 1 pixel (i.e. to 4x4) and the process repeats. Thus there isn't a formula specifically since the shape and location of all pixels is only examined on a need-to-do basis. Since the box is increased by 1 pixel in all directions you will end up with a square box.

Since with each box size increase you are only examining the new pixels along the border this is quite a fast calculation.

The formula to check if you are done is

continue while

desired percent - (on pixels within box / total on pixels in image) > 0

Make sense?

STeven.

Pick Avatar
* Question/Comment - Only <b>, <i>, <u> tags are allowed. All others will be escaped.
Use the tags [image1], [image2], etc. to place the images within your question/comment.
Upload Images (.jpg, .png, .gif) < 300K, robofiles (.robo) or Zip files (.zip) < 300K.

If you have any questions/issues about RoboRealm or image processing this is your chance to ask a question. Your question and any responses will be posted to the forum section of the website for others to read and learn from.

Note that any submission will be considered property of RoboRealm. If you do not wish your images to be displayed as part of the RoboRealm site please do not submit those images. Any submission may be removed from the website at the discretion of RoboRealm personnel.