• <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)寒,忽然年以殘,念往昔,語默心酸。二十光陰無一物,韶光賤,寐難安; 不畏形影單,道途阻且慢,哪曲折,如渡飛湍。斬浪劈波酬壯志,同把酒,共言歡! -如夢(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 閱讀(6574) 評(píng)論(2)  編輯 收藏 引用

            評(píng)論

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

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

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

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


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


            亚洲国产精品无码久久青草 | 国产99久久久国产精免费| 国产午夜精品久久久久免费视| 国产成人久久精品激情| 久久人人爽人人澡人人高潮AV | 丰满少妇人妻久久久久久| 久久免费小视频| 亚洲日本va午夜中文字幕久久 | 国产免费久久久久久无码| 精品综合久久久久久98| 成人亚洲欧美久久久久| 中文精品久久久久人妻| 91精品国产高清久久久久久91| 久久精品一本到99热免费| 国内精品久久久久久久涩爱| 亚洲精品蜜桃久久久久久| 午夜视频久久久久一区 | 性高朝久久久久久久久久| 久久精品国产91久久麻豆自制| 区亚洲欧美一级久久精品亚洲精品成人网久久久久 | 亚洲精品美女久久777777| 久久露脸国产精品| 国产激情久久久久影院| 72种姿势欧美久久久久大黄蕉| 久久人人爽人人爽人人av东京热 | 国产精品久久久久久一区二区三区 | 精品多毛少妇人妻AV免费久久| 精品熟女少妇av免费久久| 久久婷婷五月综合成人D啪| 免费一级欧美大片久久网 | 久久久无码精品亚洲日韩按摩| 久久精品国产色蜜蜜麻豆| 日韩精品无码久久一区二区三| 99久久无码一区人妻| 9999国产精品欧美久久久久久| 久久精品嫩草影院| 久久久久久综合一区中文字幕 | 97精品依人久久久大香线蕉97 | 日本高清无卡码一区二区久久 | 久久精品无码一区二区三区| 久久久精品一区二区三区|