• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            The Fourth Dimension Space

            枯葉北風(fēng)寒,忽然年以殘,念往昔,語(yǔ)默心酸。二十光陰無(wú)一物,韶光賤,寐難安; 不畏形影單,道途阻且慢,哪曲折,如渡飛湍。斬浪劈波酬壯志,同把酒,共言歡! -如夢(mèng)令

            基于Hough 變換的直線檢測(cè)(Matlab實(shí)現(xiàn))

                       輸入圖像:                              輸出圖像:


            源代碼:
            (參考Matlab houghlines 例程)

            clear
            I  = imread('taj1small3.jpg');
            I = rgb2gray(I);
            %I = imrotate(I,33,'crop');
            % figure
            % imshow(rotI);

            figure
            imshow(I);

            BW = edge(I,'canny');
            figure
            imshow(BW);
            [H,T,R] = hough(BW);

            figure
            imshow(H,[],'XData',T,'YData',R,
                'InitialMagnification','fit');
            xlabel('\theta'), ylabel('\rho');
            axis on
            axis normal
            hold on


            P  = houghpeaks(H,5,'threshold',ceil(0.3*max(H(:))));
            x = T(P(:,2)); y = R(P(:,1));
            plot(x,y,'s','color','white');
            % Find lines and plot them
            lines = houghlines(BW,T,R,P,'FillGap',5,'MinLength',7);
            figure, imshow(I),hold on

            max_len = 0;
            for k = 1:length(lines)
                xy = [lines(k).point1; lines(k).point2];
                plot(xy(:,1),xy(:,2),'LineWidth',2,'Color','green');
                
                % Plot beginnings and ends of lines
                plot(xy(1,1),xy(1,2),'x','LineWidth',2,'Color','yellow');
                plot(xy(2,1),xy(2,2),'x','LineWidth',2,'Color','red');
                
                % Determine the endpoints of the longest line segment
                len = norm(lines(k).point1 - lines(k).point2);
                if ( len > max_len)
                    max_len = len;
                    xy_long = xy;
                end
            end
            % highlight the longest line segment
            plot(xy_long(:,1),xy_long(:,2),'LineWidth',2,'Color','blue');

            PS: Matlab的例程寫的還真不錯(cuò),以后應(yīng)該多參考下...

            posted on 2013-01-17 15:35 abilitytao 閱讀(6592) 評(píng)論(2)  編輯 收藏 引用

            評(píng)論

            # re: 基于Hough 變換的直線檢測(cè)(Matlab實(shí)現(xiàn))[未登錄](méi) 2014-05-26 12:58 yy

            這不是基于,就是hough變換只不過(guò)是把一些步驟,直接用matlab的函數(shù)表示。而且代碼運(yùn)行有錯(cuò)誤。  回復(fù)  更多評(píng)論   

            # re: 基于Hough 變換的電力線的檢測(cè)[未登錄](méi) 2015-05-26 16:46 貓貓

            希望得到幫助,程序變的很好  回復(fù)  更多評(píng)論   


            只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。
            網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問(wèn)   Chat2DB   管理


            久久精品国产一区二区三区| 久久久国产精品亚洲一区| 国产精品亚洲综合久久| 久久青青草原精品影院| 国产精品成人无码久久久久久| 久久99精品免费一区二区 | 久久er国产精品免费观看2| 国产亚州精品女人久久久久久| 模特私拍国产精品久久| 奇米综合四色77777久久| 精品久久综合1区2区3区激情| 久久精品日日躁夜夜躁欧美| 国产精品久久国产精品99盘| 91麻豆国产精品91久久久| 精品久久久久久久| 一本色道久久HEZYO无码| 精品久久久久久久久久中文字幕 | 日本高清无卡码一区二区久久| 久久ZYZ资源站无码中文动漫| 四虎久久影院| 国产成人久久久精品二区三区| 久久婷婷五月综合色高清| 三级片免费观看久久| 久久夜色撩人精品国产| 精品熟女少妇a∨免费久久| 亚洲午夜久久久| 久久精品一区二区三区中文字幕| 久久青青草原精品国产| 国产激情久久久久久熟女老人| 精品人妻伦九区久久AAA片69 | 国内精品久久人妻互换| 久久免费视频一区| 久久99精品久久久久久野外| 久久精品国产亚洲Aⅴ蜜臀色欲| 国产精品福利一区二区久久| 久久99精品久久只有精品| 久久精品人人槡人妻人人玩AV | 99久久国产亚洲高清观看2024 | 久久99精品久久久久久久不卡| 麻豆亚洲AV永久无码精品久久| 久久综合亚洲色HEZYO社区|