简体   繁体   English

使用 OpenCV 测量面积的最佳方法

[英]Best way to measure area using OpenCV

enter image description here在此处输入图片说明

I'm trying to measure the orange-colored area in the image above using OpenCV.我正在尝试使用 OpenCV 测量上图中的橙色区域。 The orange area I mean here is the high temperature area.我这里的橙色区域是高温区域。 The scale on the right is the color scale of the temperature for this thermal camera imaging and my target area is from 250 degree Celcius and above.右侧的刻度是此热像仪成像的温度色标,我的目标区域是 250 摄氏度及以上。

I haven't actually coded yet, but from what I think the best way to measure this is using histogram computation for a certain range, thus getting the area.我还没有真正编码,但我认为最好的测量方法是使用一定范围的直方图计算,从而得到面积。

Is there any better way to do this?有没有更好的方法来做到这一点?

Any kind of help is very much appreciated.非常感谢任何形式的帮助。

Convert to grayscale 1 channel image, then blur and threshold.转换为灰度 1 通道图像,然后模糊和阈值。 Also you may try growing region algorithm or watershed algorithm instead thresholding.您也可以尝试使用增长区域算法或分水岭算法代替阈值。 Anyway, segmentation will give you mask of region, then use cv.countNonZero(), to get number of white pixels.无论如何,分割将为您提供区域掩码,然后使用 cv.countNonZero() 来获取白色像素的数量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 gpu 使用 opencv 测量图像清晰度 - Measure image sharpness with opencv using gpu 有没有办法通过使用 opencv/dlib 和实时流视频来获取额头(边界框)的区域 - Is there a way to get the area of the forehead (bounding box) by using opencv/dlib and for a live stream video 使用python和opencv检测图像中的文本区域 - Detect text area in an image using python and opencv 使用python检查opencv中的轮廓区域 - Checking contour area in opencv using python 使用 python 中的 opencv 更改图像中某个区域的颜色 - Changing colours of an area in an image using opencv in python 使用skimage python从图像中选择具有特定度量的区域(正方形) - Select area (square) with spicific measure from an image using skimage python 使用opencv填充图像的空白区域并除去区域中的突出区域 - Filling empty area and removing protruding areas in an area in image using opencv 如何使用OpenCV检测和测量SEM图像上的(fitEllipse)对象? - How to detect and measure(fitEllipse) objects on the SEM image using OpenCV? 如何使用python opencv测量同一图像中2行之间的角度? - How to measure the angle between 2 lines in a same image using python opencv? 使用 Python OpenCV 测量已知圆的精确 position - Measure exact position of known circle using Python OpenCV
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM