0

The resulting image needs to remove values on the strong vertical edges and above edge(black region) as they are not region of interest. Therefore, Edge detection applied.BW shows result of edge detection, size of BW(image size) is different with other matrix in the following code. How values on edge and above edge can be remove? image image2

function display_skew_final2(ST, Im,Frame)
close all;
 Contrast_maxi = max(Frame(1:1).Contrast(:));
%identify vertical edges 
BW = edge(Im(:,:,1),'prewitt',0.15,'vertical','nothinning'); 
colors = {'r'};
figure; imshow (Im(:,:,1)); 
for idxcol = 1:size(ST.KernelX,1)
for idxrow = 1:size(ST.KernelY,1)
    Contrast= Frame(1:1).Contrast(idxrow,idxcol);
    Skew= Frame(1:1).Skew(idxrow,idxcol);
    Normalize_Contrast = Contrast/Contrast_maxi ;
    radi_Contrast(:) = Normalize_Contrast;
    Skew_radi(:) = Skew;
    for    ROWCircleCenter = ST.KernelY(idxrow);
        for   COLCircleCenter = ST.KernelX(idxcol);
            centers = [COLCircleCenter ROWCircleCenter];
            if (Skew_radi < 0)
                Skew_radi2 = abs(Skew_radi); else Skew_radi2 = Skew_radi; end
            if (radi_Contrast > 0.18)
                axis ij
                viscircles (centers,Skew_radi2,'Color',colors{1});
                %                     rectangle('Position',[(COLCircleCenter) (ROWCircleCenter) Skew_radi2 Skew_radi2],'Curvature',[1 1],'FaceColor',[1 0 0],'EdgeColor',[1 0 0],'LineWidth',5)
            end
        end
    end
end

end

AI_NA
  • 336
  • 2
  • 5
  • 20
  • provide an example image... – Piglet Nov 03 '17 at 11:35
  • @Piglet screen shot of image is attached. – AI_NA Nov 03 '17 at 12:00
  • I'm not sure if I understand your problem. Do you want to remove anything outside the fan-shaped image display? – Piglet Nov 03 '17 at 12:29
  • @Piglet, another image is attached which is result of BW(edge detection), and plotted values (red marker) on this edge and outside the fan-shaped should remove. – AI_NA Nov 03 '17 at 14:26
  • if you want to remove anything outside the fan-shape why not use a ROI? I would assume that this area is static in the interface of the sonography software – Piglet Nov 03 '17 at 18:47
  • Yes, I want to remove those value that are out of ROI. – AI_NA Nov 04 '17 at 14:21

0 Answers0