help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with bwlabel and find 3.8.0 vs 3.6.4


From: ijourneaux
Subject: Problem with bwlabel and find 3.8.0 vs 3.6.4
Date: Mon, 24 Feb 2014 12:06:42 -0800 (PST)

I am trying to understand why I don't get the same results in this sample
code between 3.8.0 and 3.6.4.

In this case the data written to testindexdata.dat is not the same.  The
correct results are given by 3.6.4.

                        AAbin10=imread('TestAAbin10logical.tif');
                                
                        [L, NUM] = bwlabel(AAbin10,8);
                        imwrite(L,'TestL.tif');

                        fid2=fopen('testindexdata.dat','w');
                        for i=1:NUM;
                                [IN JN]=find(uint8(L)== uint8(i));
                                index(i)=NUM;
                                indexx(i)=IN(1);
                                indexy(i)=JN(1);
                                fprintf(fid2,"%d, %d, %d, %d\n", i, index(i), 
indexx(i), indexy(i));
                        end
                        fclose(fid2);

Here is the test input file.

https://dl.dropboxusercontent.com/u/76158792/TestAAbin10logical.tif




--
View this message in context: 
http://octave.1599824.n4.nabble.com/Problem-with-bwlabel-and-find-3-8-0-vs-3-6-4-tp4662256.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]