Is there such thing as getting masks length and width?

Dear @John6666 @Alanturner2 and other community members

From masks I made, can I draw a projection from it to represent an area of something with certain width according to the mask? Like can I just take a row of the mask and determine it as the height of the whole thing?

This has not included with the real height from projecting it with real world comparison

1 Like

Hello. Do you mean you want to enlarge the mask vertically? Or something more complicated?

Just wondering if I can get some size from the masked ROI to be used as a way to measure size of a river through projections.

Or simply draw a line along the length of the mask to represent edge of a water. Although getting depth from this alone might require further calculation with fluids intake per fps or something…

Was my idea too much or simply ungrounded

How does implementation like microsoft word can convert px to cm anyway?

1 Like

(post deleted by author)

So you’re saying that you want to use normal image processing to replace the simplified version of the work done by Depth Estimation models, etc…?
As for the ratio of the river to the field of vision, it’s enough to just count the number of black areas, but beyond that, as you say, it’s quite difficult. It might be easier to look for a model.:sweat_smile:
I can’t post a link…

There seem to be various approaches, such as using YOLO to detect objects of known size (such as cars) and using them as size standards, or using depth estimation models.

Depth estimatiom models? I think I’ll check them out

Yeah I’m just making sure if anyone ever did something like that :sweat_smile:

1 Like

I think it’s a model that estimates how far away the objects in the image are from the camera. If it’s accurate, then all you have to do is work out the length of the objects in the image by working backwards using trigonometric functions… There was also a github that actually did this.

Well, it’s something we do in our brains on a daily basis. There are also quite a few depth estimation models for HF.

BTW, in the case of rivers, it is important to consider not only the size of the river visible on the surface, but also its depth. I have also seen approaches that collect images of actual rivers and classify them according to the risk of flooding before training the image classification model.

Interesting, can I see such sources you see for the river estimation model?

Btw I found something called DPI, that seems helpful for the conversion but I think it also boils down to resolution of the raw image which might be a problem for a jpeg-screenshot-from-video image…

1 Like

This is what I came across while searching. This is a personal, experimental project…

But since the goal is to address the issue of disaster prevention, which is a global issue, I think there may be some clues if you search for comprehensive approaches rather than individual technologies. Even if the methods are not disclosed, you can make some assumptions. Because the big categories of AI models themselves are limited. If they are using one of them, then it’s just a puzzle. :laughing:

Yeah looks like the creator is also categorizing it by images or they group the images into 3 categories: safe, warning, danger. It’s hard to get each condition on my side this way since the river hasn’t been flooded for 5 years, the testing will and only use the safe water level only…

But I also realize “classifying” with such pattern will create so much bias for the AI and I prefer a methodical calculation of height if there exist, that requires me to project what I infer with model to the real river size including the lens and positional tilt correction…

I found this, not river, but they measure camera-captured lengths compared to real length i don’t know if this is appliable or not, it’s just cool that people think about it for different stuff already.

Anyway thanks for your help, I’m always amazed with what your search engine could find. Sorry for the delay too, my answer need to pass moderators first for past three days! :sweat_smile:

1 Like

I’m just searching on Bing and Google.:sweat_smile: