| 1 | 1/1 | 返回列表 |
| 查看: 1094 | 回復(fù): 0 | ||
xqe321鐵蟲(chóng) (初入文壇)
|
[求助]
hough變換直線(xiàn)擬合matlab提示報(bào)錯(cuò),求助~~
|
|
在網(wǎng)上找了個(gè)hough變換直線(xiàn)擬合的程序,運(yùn)行后提示??? Error using ==> imshow>ParseInputs Unknown option string "fit" Error in ==> imshow at 85 [cdata, cdatamapping, clim, map, xdata, ydata, filename, ...,請(qǐng)問(wèn)大神們?cè)撊绾谓鉀Q?我的版本是matlab7.0. 我的目的是對(duì)提取后的邊緣進(jìn)行直線(xiàn)擬合,目前邊緣已經(jīng)提取出來(lái),在hough變換卡著了,希望大神們不吝賜教,謝謝! matlab程序(daokou.bmp即為邊緣圖像): clear; clc; close all; I= imread(\'daokou.bmp\'); I=rgb2gray(I); rotI = imrotate(I,33,\'crop\'); [H,T,R] = hough(I); imshow(H,[0 255],\'XData\',T,\'YData\',R,\'InitialMagnification\',\'fit\'); xlabel(\'\\theta\'), ylabel(\'\\rho\'); axis on, axis normal, hold on; P = houghpeaks(H,200,\'threshold\',ceil(0.11*max(H( )),\'NHoodSize\',[31 31]);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\',60,\'MinLength\',10); figure,imshow(BW); 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\',\'cyan\'); |

| 1 | 1/1 | 返回列表 |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 一志愿西南交大,求調(diào)劑 +5 | 材化逐夢(mèng)人 2026-03-18 | 5/250 |
|
|---|---|---|---|---|
|
[考研] 274求調(diào)劑 +10 | S.H1 2026-03-18 | 10/500 |
|
|
[考研] 一志愿南昌大學(xué),327分,材料與化工085600 +9 | Ncdx123456 2026-03-19 | 9/450 |
|
|
[考研] 290求調(diào)劑 +7 | ^O^乜 2026-03-19 | 7/350 |
|
|
[考研] 材料學(xué)碩297已過(guò)四六級(jí)求調(diào)劑推薦 +11 | adaie 2026-03-19 | 11/550 |
|
|
[考研]
|
簡(jiǎn)木ChuFront 2026-03-19 | 8/400 |
|
|
[考研] 353求調(diào)劑 +3 | 拉鉤不許變 2026-03-20 | 3/150 |
|
|
[基金申請(qǐng)]
學(xué)校已經(jīng)提交到NSFC,還能修改嗎?
40+4
|
babangida 2026-03-19 | 8/400 |
|
|
[考研] 0703化學(xué)調(diào)劑 +4 | 18889395102 2026-03-18 | 4/200 |
|
|
[考研] 一志愿西安交通大學(xué)材料工程專(zhuān)業(yè) 282分求調(diào)劑 +5 | 楓橋ZL 2026-03-18 | 7/350 |
|
|
[考研] 0703化學(xué)調(diào)劑 +5 | pupcoco 2026-03-17 | 8/400 |
|
|
[考研] 化學(xué)工程321分求調(diào)劑 +15 | 大米飯! 2026-03-15 | 18/900 |
|
|
[考研] 0854可跨調(diào)劑,一作一項(xiàng)核心論文五項(xiàng)專(zhuān)利,省、國(guó)級(jí)證書(shū)40+數(shù)一英一287 +8 | 小李0854 2026-03-16 | 8/400 |
|
|
[考博] 26博士申請(qǐng) +3 | 1042136743 2026-03-17 | 3/150 |
|
|
[考研] 考研求調(diào)劑 +3 | 橘頌. 2026-03-17 | 4/200 |
|
|
[考研] 277調(diào)劑 +5 | 自由煎餅果子 2026-03-16 | 6/300 |
|
|
[考研] 275求調(diào)劑 +4 | 太陽(yáng)花天天開(kāi)心 2026-03-16 | 4/200 |
|
|
[論文投稿] 有沒(méi)有大佬發(fā)小論文能帶我個(gè)二作 +3 | 增銳漏人 2026-03-17 | 4/200 |
|
|
[考研] [導(dǎo)師推薦]西南科技大學(xué)國(guó)防/材料導(dǎo)師推薦 +3 | 尖角小荷 2026-03-16 | 6/300 |
|
|
[考研] 070305求調(diào)劑 +3 | mlpqaz03 2026-03-14 | 4/200 |
|