[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
exporting sparse matrix or inverse of spconvert
From: |
tinku99 |
Subject: |
exporting sparse matrix or inverse of spconvert |
Date: |
Sun, 22 Nov 2009 16:08:38 -0800 (PST) |
I want access to the 3 vectors representing rows, columns, and values of my
sparse matrix.
Is there a way to get at these easier than having to iterate through the
nonsparse matrix?
I am trying to find the orientation of the largest connected region in a
binary image as follows:
I need a column and row vectors of the sparse matrix to feed fitellipse.m
by fitzgibbon here:
http://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/FITZGIBBON/ELLIPSE/
I am able to get the largest connected region with the following:
% Copyright 2009 Naveen Garg (address@hidden)
% GPL V2 http://www.gnu.org/licenses/gpl-2.0.html
function largest_blob = maxregion(binary_image)
% $$$ return region with largest area for given binary image
[labeled_image, num] = bwlabel(binary_image);
[N, X]=imhist(labeled_image, num + 1);
N(1) = 0;
[max,index_max] = max(N);
largest_blob = (labeled_image == (index_max - 1));
--
View this message in context:
http://old.nabble.com/exporting-sparse-matrix-or-inverse-of-spconvert-tp26471004p26471004.html
Sent from the Octave - General mailing list archive at Nabble.com.
- exporting sparse matrix or inverse of spconvert,
tinku99 <=