Prev: how to convert all frames of particular video into corresponding images?
Next: How does interpolation work in interp2?
From: ImageAnalyst on 4 Aug 2010 14:06 Anna: No, we shouldn't clutter up the file Exchange with test code like that. You can upload your code to http://drop.io. Upload the m-file and some image files.
From: Walter Roberson on 4 Aug 2010 14:12 Anna wrote: > I have used a loop as I thought that you cant write: > > stats.BoundingBox(3), you need stats(1).BoundingBox(3), as you need a > field after stats? stats.BoundingBox(3) would be equivalent to writing a comma-delimited list, stats(1).BoundingBox(3), stats(2).BoundingBox(3), stats(3).BoundingBox(3) and so on until the end of the array. Using this definition, you can see that if stats only has a single member, stats(1), that this would become just stats(1).BoundingBox(3) and thus stats.BoundingBox(3) would in that case be the same as stats(1).BoundingBox(3)
From: Anna on 4 Aug 2010 14:41 Thank you for your comments. You can find the code and the image being analysed at http://drop.io/jtcbpfb I have also tried changing to stats.BoundingBox and removing the loop, however I get the following error when I do this: ??? Field reference for multiple structure elements that is followed by more reference blocks is an error. Error in ==> BlobsDemo_Anna3 at 106 keeperImage = find(([stats.Area] <= 8) & ([stats.BoundingBox(3)] <=10) & ([stats.BoundingBox(4)] <=10));
From: Walter Roberson on 4 Aug 2010 14:49 Anna wrote: > I have also tried changing to stats.BoundingBox and removing the loop, > however I get the following error when I do this: > > ??? Field reference for multiple structure elements that is followed by > more > reference blocks is an error. > > Error in ==> BlobsDemo_Anna3 at 106 > keeperImage = find(([stats.Area] <= 8) & ([stats.BoundingBox(3)] <=10) & > ([stats.BoundingBox(4)] <=10)); In that case, arrayfun(@(v) v.BoundingBox(3), stats) where you have stats.BoundingBox(3)
From: Anna on 5 Aug 2010 03:43
Thats works, thanks. However I am still having trouble filtering out the smaller areas from my code. |