亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? cleanedgelist.m

?? MATLAB Functions for Multiple View Geometry
?? M
字號:
% CLEANEDGELIST - remove short edges from a set of edgelists%% Function to clean up a set of edge lists generated by EDGELINK so that% isolated edges and spurs that are shorter that a minimum length are removed.% This code can also be use with a set of line segments generated by LINESEG.%% Usage: nedgelist = cleanedgelist(edgelist, minlength)%% Arguments:%                edgelist - a cell array of edge lists in row,column coords in%                           the form%                           { [r1 c1   [r1 c1   etc }%                              r2 c2    ...%                                       ...%                              rN cN]   ....]   %                minlength - minimum edge length of interest%% Returns:%                nedgelist - the new, cleaned up set of edgelists%% See also:  EDGELINK, DRAWEDGELIST, LINESEG% Copyright (c) 2006 Peter Kovesi% School of Computer Science & Software Engineering% The University of Western Australia% pk at csse uwa edu au% http://www.csse.uwa.edu.au/% % Permission is hereby granted, free of charge, to any person obtaining a copy% of this software and associated documentation files (the "Software"), to deal% in the Software without restriction, subject to the following conditions:% % The above copyright notice and this permission notice shall be included in % all copies or substantial portions of the Software.%% The Software is provided "as is", without warranty of any kind.%% December 2006  Original version% February 2007  A major rework to fix several problems, hope they really are%                fixed!function nedgelist = cleanedgelist(edgelist, minlength)        Nedges = length(edgelist);    Nnodes = 2*Nedges;    % Each edgelist has two end nodes - the starting point and the ending point.    % We build up an adjacency/connection matrix for each node so that we can    % determine which, if any, edgelists are connected to a node. We also    % maintain an adjacency matrix for the edges themselves.    %     % It is tricky maintaining all this information but it does allow the    % code to run much faster.    % First extract the end nodes from each edgelist.  The nodes are numbered    % so that the start node has number 2*edgenumber-1 and the end node has    % number 2*edgenumber    node = zeros(Nnodes, 2);    for n = 1:Nedges	node(2*n-1,:) = edgelist{n}(1,:);	node(2*n  ,:) = edgelist{n}(end,:);	    end        % Now build the adjacency/connection matrices.     A = zeros(Nnodes);   % Adjacency matrix for nodes    B = zeros(Nedges);   % Adjacency matrix for edges        for n = 1:Nnodes-1	for m = n+1:Nnodes            % If nodes m & n are connected	    A(n,m) =  node(n,1)==node(m,1) && node(n,2)==node(m,2);	    A(m,n) = A(n,m);	    	    if A(n,m)		edgen = fix((n+1)/2);		edgem = fix((m+1)/2);				B(edgen, edgem) = 1;		B(edgem, edgen) = 1;			    end	end    end    % If we sum the columns of the adjacency matrix we get the number of    % other edgelists that are connected to an edgelist    Nconnections = sum(A);   % Connection count array for nodes    Econnections = sum(B);   % Connection count array for edges        % Check every edge to see if any of its ends are connected to just one edge.    % This should not happen, but occasionally does due to a problem in    % EDGELINK.  Here we simply merge it with the edge it is connected to.    % Ultimately I want to be able to remove this block of code.    % I think there are also some cases that are (still) not properly handled    % by CLEANEDGELIST and there may be a case for repeating this block of    % code at the end for another final cleanup pass    for n = 1:Nedges	if ~B(n,n) && ~isempty(edgelist{n}) % if edge is not connected to itself	    [spurdegree, spurnode, startnode, sconns, endnode, econns] = connectioninfo(n);	    if sconns == 1		node2merge = find(A(startnode,:));		mergenodes(node2merge,startnode);	    end	    	    if ~isempty(edgelist{n})   % If we have not removed this edge in                                       % the code above check the other end.		if econns == 1		    node2merge = find(A(endnode,:));		    mergenodes(node2merge,endnode);		end	    	    end	end    end            % Now check every edgelist, if the edgelength is below the minimum length    % check if we should remove it.    if minlength > 0	    for n = 1:Nedges		[spurdegree, spurnode] = connectioninfo(n);		if ~isempty(edgelist{n}) && edgelistlength(edgelist{n}) < minlength  	    % Remove unconnected lists, or lists that are only connected to            % themselves. 	    if ~Econnections(n) || (Econnections(n)==1 && B(n,n) == 1)		removeedge(n);	    	    % Process edges that are spurs coming from a 3-way junction.	    elseif spurdegree == 2		%fprintf('%d is a spur\n',n)  %%debug		linkingedges = find(B(n,:));				if length(linkingedges) == 1 % We have a loop with a spur                                             % coming from the join in the                                             % loop                   % Just remove the spur, leaving the loop intact.                   removeedge(n);  		   		else   % Check the other edges coming from this point. If any                       % are also spurs make sure we remove the shortest one                   spurs = n;		   len = edgelistlength(edgelist{n});		   for i = 1:length(linkingedges)		       spurdegree = connectioninfo(linkingedges(i));		       if spurdegree			   spurs = [spurs linkingedges(i)];  			   len = [len edgelistlength(edgelist{linkingedges(i)})];  		       end		   end		   linkingedges = [linkingedges n];		   		   [mn,i] = min(len);		   edge2delete = spurs(i);                   [spurdegree, spurnode] = connectioninfo(edge2delete);		   nodes2merge = find(A(spurnode,:));		   		   if length(nodes2merge) ~= 2		       error('attempt to merge other than 2 nodes');		   end		   		   removeedge(edge2delete);				   mergenodes(nodes2merge(1),nodes2merge(2))		   		   		end 	    % Look for spurs coming from 4-way junctions that are below the minimum length	    elseif spurdegree == 3		removeedge(n);	  % Just remove it, no subsequent merging needed.	    end	end    end        % Final cleanup of any new isolated edges that might have been created by    % removing spurs.  An edge is isolated if it has no connections to other    % edges, or is only connected to itself (in a loop).        for n = 1:Nedges	if ~isempty(edgelist{n}) && edgelistlength(edgelist{n}) < minlength  	    if ~Econnections(n) || (Econnections(n)==1 && B(n,n) == 1)		removeedge(n);			    end	end    end        end % if minlength > 0        % Run through the edgelist and extract out the non-empty lists    m = 0;    for n = 1:Nedges       if ~isempty(edgelist{n})	   m = m+1;	   nedgelist{m} = edgelist{n};       end    end	    %---------------------------------------------------------------------- % Internal function to merge 2 edgelists together at the specified nodes and% perform the necessary updates to the edge adjacency and node adjacency% matrices and the connection count arraysfunction mergenodes(n1,n2)        edge1 = fix((n1+1)/2);   % Indices of the edges associated with the nodes    edge2 = fix((n2+1)/2);        % Get indices of nodes at each end of the two edges    s1 = 2*edge1-1; e1 = 2*edge1;    s2 = 2*edge2-1; e2 = 2*edge2;            if edge1==edge2	% We should not get here, but somehow we occasionally do	% fprintf('Nodes %d %d\n',n1,n2)    %% debug	% warning('Attempt to merge an edge with itself')	return    end        if ~A(n1,n2)	error('Attempt to merge nodes that are not connected');    end        if mod(n1,2)  % node n1 is the start of edge1	flipedge1 = 1;  % edge1 will need to be reversed in order to join edge2    else 	flipedge1 = 0;     end        if mod(n2,2)  % node n2 is the start of edge2		flipedge2 = 0;    else	flipedge2 = 1;    end        % Join edgelists together - with appropriate reordering depending on which    % end is connected to which.  The result is stored in edge1        if  ~flipedge1 && ~flipedge2 	edgelist{edge1} = [edgelist{edge1}; edgelist{edge2}];	A(e1,:) = A(e2,:); 	A(:,e1) = A(:,e2);	Nconnections(e1) = Nconnections(e2);	    elseif  ~flipedge1 && flipedge2	edgelist{edge1} = [edgelist{edge1}; flipud(edgelist{edge2})];			A(e1,:) = A(s2,:); 	A(:,e1) = A(:,s2);	Nconnections(e1) = Nconnections(s2);    elseif  flipedge1 && ~flipedge2	edgelist{edge1} = [flipud(edgelist{edge1}); edgelist{edge2}]; 		A(s1,:) = A(e1,:); 	A(:,s1) = A(:,e1);	A(e1,:) = A(e2,:); 	A(:,e1) = A(:,e2);		Nconnections(s1) = Nconnections(e1);	Nconnections(e1) = Nconnections(e2);	    elseif  flipedge1 && flipedge2	edgelist{edge1} = [flipud(edgelist{edge1}); flipud(edgelist{edge2})];	A(s1,:) = A(e1,:); 	A(:,s1) = A(:,e1);	    	A(e1,:) = A(s2,:); 	A(:,e1) = A(:,s2);	Nconnections(s1) = Nconnections(e1);	Nconnections(e1) = Nconnections(s2);	    else        fprintf('merging edges %d and %d\n',edge1, edge2); %%debug		error('We should not have got here - edgelists cannot be merged');    end        % Now correct the edge adjacency matrix to reflect the new arrangement    % The edges that the new edge1 is connected to is all the edges that    % edge1 and edge2 were connected to    B(edge1,:) = B(edge1,:) | B(edge2,:);    B(:,edge1) = B(:,edge1) | B(:,edge2);        B(edge1, edge1) = 0;    % Recompute connection counts because we have shuffled the adjacency matrices    Econnections = sum(B);    Nconnections = sum(A);      removeedge(edge2);  % Finally discard edge2    end  % end of mergenodes%--------------------------------------------------------------------    % Function to provide information about the connections at each end of an% edgelist %%   [spurdegree, spurnode, startnode, sconns, endnode, econns] = connectioninfo(n)%%  spurdegree - If this is non-zero it indicates this edgelist is a spur, the%               value is the number of edges this spur is connected to.%  spurnode   - If this is a spur spurnode is the index of the node that is%               connected to other edges, 0 otherwise.%  startnode  - index of starting node of edgelist.%  endnode    - index of end node of edgelist.%  sconns     - number of connections to start node.%  econns     - number of connections to end node.    function [spurdegree, spurnode, startnode, sconns, endnode, econns] = connectioninfo(n)    if isempty(edgelist{n})	spurdegree = 0; spurnode = 0;	startnode = 0; sconns = 0; endnode = 0; econns = 0;	return    end        startnode = 2*n-1;    endnode   = 2*n;    sconns = Nconnections(startnode);  % No of connections to start node    econns = Nconnections(endnode);    % No of connections to end node            if sconns == 0 && econns >= 1	spurdegree = econns;	spurnode = endnode;    elseif sconns >= 1 && econns == 0	spurdegree = sconns;	spurnode = startnode;	    else	spurdegree = 0;	spurnode = 0;    end    end%--------------------------------------------------------------------% Function to remove an edgelist and perform the necessary updates to the edge% adjacency and node adjacency matrices and the connection count arraysfunction removeedge(n)        edgelist{n} = [];    Econnections = Econnections - B(n,:);     Econnections(n) = 0;     B(n,:) = 0;    B(:,n) = 0;        nodes2delete = [2*n-1, 2*n];        Nconnections = Nconnections - A(nodes2delete(1),:);        Nconnections = Nconnections - A(nodes2delete(2),:);                A(nodes2delete, :) = 0;    A(:, nodes2delete) = 0;		        end%--------------------------------------------------------------------% Function to compute the path length of an edgelistfunction l = edgelistlength(edgelist)    l = sum(sqrt(sum((edgelist(1:end-1,:)-edgelist(2:end,:)).^2, 2)));end%--------------------------------------------------------------------end % End of cleanedgelists    

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线免费观看不卡av| 日日摸夜夜添夜夜添国产精品| 91久久精品一区二区| 成人爽a毛片一区二区免费| 日韩中文字幕麻豆| 日本不卡一二三区黄网| 婷婷综合五月天| 婷婷综合五月天| 热久久久久久久| 日本午夜精品一区二区三区电影| 午夜精品福利一区二区蜜股av| 亚洲国产精品久久久男人的天堂 | 偷拍一区二区三区| 亚洲精品第一国产综合野| 欧美韩国日本一区| 亚洲视频 欧洲视频| 亚洲黄色免费网站| 麻豆中文一区二区| 国产sm精品调教视频网站| www.亚洲在线| 一本大道综合伊人精品热热| 欧美精品 国产精品| 精品国产免费视频| 亚洲色图视频网| 偷拍自拍另类欧美| 成人网男人的天堂| 日韩一二三区不卡| 国产精品久久久一本精品| 一区二区三区欧美激情| 久热成人在线视频| 99久久精品国产精品久久| 欧美日韩一二三区| 国产色婷婷亚洲99精品小说| 亚洲午夜成aⅴ人片| 韩国毛片一区二区三区| 色一情一伦一子一伦一区| 精品国产1区二区| 一二三区精品福利视频| 国产麻豆视频一区| 6080午夜不卡| 伊人色综合久久天天人手人婷| 欧美bbbbb| 91久久久免费一区二区| 久久久91精品国产一区二区三区| 一区二区三区国产精华| 国产超碰在线一区| 91精品福利在线一区二区三区 | 国产精品国产自产拍高清av| 天天av天天翘天天综合网| 国产激情一区二区三区四区| 91麻豆精品国产自产在线观看一区| 久久久久国产精品厨房| 免费成人你懂的| 91成人在线免费观看| 国产女人水真多18毛片18精品视频 | 日韩精品乱码免费| 99视频精品全部免费在线| 欧美成人一区二区三区| 日本一区中文字幕| 欧美色图12p| 一区二区三区 在线观看视频| 国产成+人+日韩+欧美+亚洲 | 岛国精品在线播放| 欧美成人一区二区三区片免费| 婷婷丁香激情综合| 欧美日韩和欧美的一区二区| 亚洲精品综合在线| 91视频国产观看| 亚洲免费看黄网站| 色综合久久中文字幕综合网 | 欧美tk丨vk视频| 日韩激情中文字幕| 777a∨成人精品桃花网| 丝袜国产日韩另类美女| 欧美日韩国产影片| 日本欧美一区二区在线观看| 日韩免费成人网| 激情久久五月天| 欧美激情中文字幕一区二区| 成人免费av网站| 亚洲欧美综合色| 在线一区二区三区做爰视频网站| 亚洲欧美日韩系列| 欧美色偷偷大香| 日韩av一二三| 欧美电影免费观看完整版| 激情偷乱视频一区二区三区| 国产日韩精品一区二区三区 | 91丝袜国产在线播放| 亚洲视频免费在线观看| 色婷婷久久久亚洲一区二区三区| 亚洲欧美激情插| 欧美日韩mp4| 蜜臀av一级做a爰片久久| 2020日本不卡一区二区视频| 国产精品99久久久久| 国产精品久久久久一区二区三区共 | 欧美日韩一级大片网址| 美国十次综合导航| 国产精品亲子乱子伦xxxx裸| 91福利区一区二区三区| 久久精品国产精品亚洲红杏| 国产精品妹子av| 欧美美女一区二区三区| 国产成人免费9x9x人网站视频| 亚洲天堂网中文字| 日韩美女主播在线视频一区二区三区 | 中文字幕一区在线| 在线电影院国产精品| 国产iv一区二区三区| 一区二区三区毛片| 久久久久久久久久电影| 色婷婷精品大在线视频| 美国av一区二区| 综合欧美一区二区三区| 91精品国产丝袜白色高跟鞋| 国产成人啪免费观看软件| 亚洲综合视频在线观看| 国产丝袜在线精品| 91精品国产欧美日韩| 92精品国产成人观看免费| 亚洲狠狠爱一区二区三区| 久久精品在这里| 欧美日韩免费观看一区三区| 国产福利精品一区| 日产精品久久久久久久性色| 亚洲男人电影天堂| 国产精品卡一卡二卡三| 精品国产一二三| 欧美肥大bbwbbw高潮| 色老汉av一区二区三区| 不卡一区中文字幕| 国产精品一区二区三区乱码 | 国产精品白丝在线| 久久先锋资源网| 精品卡一卡二卡三卡四在线| 欧美日韩五月天| 在线看一区二区| 色丁香久综合在线久综合在线观看| 成人在线一区二区三区| 国产黄色成人av| 国产精品自在在线| 精品一区二区三区久久久| 亚洲成av人片一区二区梦乃| 亚洲精品你懂的| 亚洲日本在线天堂| 欧美老人xxxx18| 国产成人在线影院| 视频一区免费在线观看| 视频一区免费在线观看| 亚洲欧美激情一区二区| 色狠狠一区二区三区香蕉| 91网站最新网址| 777xxx欧美| 色综合久久88色综合天天免费| 亚洲v日本v欧美v久久精品| 精品人在线二区三区| 97超碰欧美中文字幕| 另类欧美日韩国产在线| 日精品一区二区三区| 亚洲一区二区视频在线观看| 日韩中文字幕亚洲一区二区va在线| 国产精品免费观看视频| 精品国产乱码久久久久久夜甘婷婷| 日韩午夜小视频| 日韩久久免费av| 久久久久久一级片| 中文字幕一区在线观看视频| 亚洲欧洲av在线| 亚洲超丰满肉感bbw| 国产在线精品一区二区夜色| 国产精品99久久久久久有的能看 | 亚洲综合色成人| 午夜精品久久久| 国产精品综合二区| eeuss鲁一区二区三区| 欧美日韩大陆一区二区| 日韩精品一区二区在线| 国产精品天天摸av网| 中文字幕制服丝袜成人av| 亚洲h精品动漫在线观看| 捆绑调教美女网站视频一区| 成人毛片在线观看| 欧美精品国产精品| 精品理论电影在线| 亚洲精品v日韩精品| 日韩不卡一二三区| 99综合电影在线视频| 91精品国产一区二区三区蜜臀| 国产日韩欧美精品一区| 亚洲成a人v欧美综合天堂下载| 精品夜夜嗨av一区二区三区| 色综合网站在线| 国产亚洲va综合人人澡精品 | 国产一区二区三区香蕉 | 国产suv精品一区二区三区| 欧美视频中文字幕| 国产精品水嫩水嫩| 日韩精品亚洲一区二区三区免费| 成人福利视频在线|