帮助图像处理

2个视图(过去30天)
Punnag Chatterjee
Punnag Chatterjee 2018年2月2日
我有一个序列的图像,其区域属性,我希望获得。为此,我必须找到物体的包络。在附件中的“samples.jpg”图像中,我们可以看到左边一列是4个灰度图像,右边一列是相应的二值图像。然而,这几乎给了我所需要的面积,但不是完全。实际需要的区域是在'required.jpg'中手工绘制的蓝色边框中突出显示的区域。我提供了“L10_T1_A0.zip”,其中包含更多这样的示例。
这是我一直在做的来获得区域(更重要的是所需形状的B/W二值图像)。我怎样才能得到一个更好的“打开”图像?
half_Imr——>是'samples.jpg'左列上的灰度图像
iopened——>是'samples.jpg'右列的二进制图像
get_area_from_image—>另一个自定义函数,使用'regionprops' MATLAB函数获取区域
Level = 0.3;
I_BW = imbinalize (half_Imr,level);%二进制图像出现在'samples.jpg'的右栏
Morph_rect = [4 39];
Ifill = imfill(I_BW,“黑洞”);
n . (n .)“矩形”, morph_rect);
iopened = imopen(Ifill,se);
%被色带扫过的评估区域
Pixel2mm = 19/60;%从像素校准到毫米
图像= get_area_from_image(iopen, pixel2mm);
----------------------------------------------------------------------------------
函数图像= get_area_from_image(iopen, pixels2mm)
这个函数给出了面积
Iregion_temp = regionprops(iopen,“区域”);
[sz,~] = size(Iregion_temp);
temp = struct2cell(Iregion_temp);
Temp1 = cell2mat(temp);
如果Sz > 1%多簇白色区域的图像给出多个区域
aim 2 = max(temp1);
elseifIsempty (temp1) == 0
aim 2 = temp1;
其他的
aim2 = 0;
结束
Aimm2 = Aimm2*pixels2mm^2;
图像= aim2 *1e-6;% m ^ 2
结束

答案(0)

社区寻宝

在MATLAB中央找到宝藏,并发现社区可以如何帮助你!

开始狩猎!