How to remove values on Edge and above Edge?
    4 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
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? screenshot of result is attached.
 function display_skew_final2(ST, Im,Frame)
close all;
load Im
 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
0 Commenti
Risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
