MATLAB: How to find “rectangular” corners cornersimage processingImage Processing Toolboxpgoncorners Hey, I have this image: I want to find the 4 corners of the "rectangular", but I don't want to use the "corner" function. What can I do? Thanks. Best Answer If the quadrilateral is roughly aligned with the edges of the image, you could also find the corners as follows, [I,J]=find(Image>max(Image(:))/2); IJ=[I,J]; [~,idx]=min(IJ*[1 1; -1 -1; 1 -1; -1 1].'); corners=IJ(idx,:) Related SolutionsMATLAB: Perceptron : Recognition Pattern ABC Start with MATLAB examples help fitnet % regression/curve-fitting help patternnet % classification/pattern-recognition help nndata Then submit failed code with comments and/or error messagesHope this helps.Greg MATLAB: Coordinates of corners of quadrilateral in binary mask The Computer Vision Toolbox has some ready-made corner detection functions, e.g.,https://www.mathworks.com/help/vision/ref/detectmineigenfeatures.htmlhttps://www.mathworks.com/help/vision/ref/detectharrisfeatures.htmlYou could also try this improvised algorithm:N=360;theta=linspace(0,360,N);[I,J]=find(Image);IJ=[I,J];c=nan(size(theta));for i=1:N [~,c(i)]=max(IJ*[cosd(theta(i));sind(theta(i))]); endH=histcounts(c,1:numel(I)+1);[~,k] = maxk(H,4);corners=IJ(k,:) Related QuestionI want measuring angle in imageHow to detect three low contrast shapeless objects
Best Answer