简体   繁体   中英

how can I find the center point (x,y) of the mask?

I am working on the MASK RCNN model to detect the head and body of a chicken. After I get the mask I want to find the (x,y) centre points. I thought maybe it is possible to find it by referring to the mask but I cannot find a function that does that, or by detecting the colour as it is based on the mask id.

Here is an image of my result.

在此处输入图像描述

Thank you

Mask_RCNN takes a raster image, creates an intermediate vector map, and then translates that back to a raster image you use as a map, to my understanding. Assuming that is what you've used it for -- there's many ways to find the center of a given shape, but I imagine the simplest to write and understand would be to just average the location of every point inside the raster map.

What did you attempt? What format is the mask in? What output did you expect from what you tried, and what did you expect? Please include a minimum reproducable example and make sure to help others reproduce the problem so they can give you more specific help.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM