Prev: color names
Next: No one?
From: Steven Lord on 26 Mar 2010 09:30 "stephanie scicluna" <skms125(a)yahoo.co.uk> wrote in message news:hoi5ih$iij$1(a)fred.mathworks.com... > "Valentine Oradiegwu" <obioradiegwu(a)yahoo.com> wrote in message > <hnbdat$54k$1(a)fred.mathworks.com>... >> Hello ImageAnalyst, >> Many thanks. >> Cheers! > > Hi, > > May i ask how did you manage to object the average colour? > > I have something similar. this is how i carried it out -> i have an image > which i have converted to binary and added some touch ups to fill in the > blanks etc. > Now i have labelled my objects, placed a bounding box around and obtained > these values. > I have found the rgb values for the whole image and found the average > values but when it comes to just that object i am stuck. > > could someone help out pls? > > i tried using p = objectProperties(k).PixelIdxList; but get a list of > numbers which are quite high like 44778, 44779, etc.. and have no idea > what these are! > Are you using BWCONNCOMP or REGIONPROPS to generate your objectProperties struct? If so, the documentation for each of those functions describes what the values in the PixelIdxList field represent. http://www.mathworks.com/access/helpdesk/help/toolbox/images/bwconncomp.html http://www.mathworks.com/access/helpdesk/help/toolbox/images/regionprops.html -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
From: ImageAnalyst on 26 Mar 2010 10:11 On Mar 26, 7:25 am, "stephanie scicluna" <skms...(a)yahoo.co.uk> wrote: > May i ask how did you manage to object the average colour? > > I have something similar. this is how i carried it out -> i have an image which i have converted to binary and added some touch ups to fill in the blanks etc. > Now i have labelled my objects, placed a bounding box around and obtained these values. > I have found the rgb values for the whole image and found the average values but when it comes to just that object i am stuck. > > could someone help out pls? > > i tried using p = objectProperties(k).PixelIdxList; but get a list of numbers which are quite high like 44778, 44779, etc.. and have no idea what these are! ------------------------------------------------------------------------------------------------------------ Stephanie: You're using the wrong measurement of objectProperties. You want to use MeanIntensity instead of PixelIdxList. Perhaps you'd like to run through these demos: http://www.mathworks.com/matlabcentral/fileexchange/25157 http://www.mathworks.com/matlabcentral/fileexchange/26420-simplecolordetection
From: stephanie scicluna on 27 Mar 2010 06:55 Hi, Thanks for your advice. I have managed to use PixelList to obtain the pixel positions for the blob and then using each position obtained the rgb values. then i found the mean R, G and B values for each blob. Computation time is massive!!! but at least i obtained the output i required. I have another issue now maybe someone could hint if I am going in the right direction. As I have obtained my extracted features - mean colour values per blob, width and height of bounding box and the centre of mass I must now find similarity between the same blob in different frames. I was thinking of finding the distance (so minimal distance) would mean its the same object. Then once i have found the same blob I can find the motion of direction using the width and height? Any questions regarding this pls? Thanks ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <ec306a81-eef8-470f-925c-d694b05405bf(a)d27g2000yqf.googlegroups.com>... > On Mar 26, 7:25 am, "stephanie scicluna" <skms...(a)yahoo.co.uk> wrote: > > May i ask how did you manage to object the average colour? > > > > I have something similar. this is how i carried it out -> i have an image which i have converted to binary and added some touch ups to fill in the blanks etc. > > Now i have labelled my objects, placed a bounding box around and obtained these values. > > I have found the rgb values for the whole image and found the average values but when it comes to just that object i am stuck. > > > > could someone help out pls? > > > > i tried using p = objectProperties(k).PixelIdxList; but get a list of numbers which are quite high like 44778, 44779, etc.. and have no idea what these are! > ------------------------------------------------------------------------------------------------------------ > Stephanie: > You're using the wrong measurement of objectProperties. You want to > use MeanIntensity instead of PixelIdxList. > Perhaps you'd like to run through these demos: > http://www.mathworks.com/matlabcentral/fileexchange/25157 > http://www.mathworks.com/matlabcentral/fileexchange/26420-simplecolordetection >
From: ImageAnalyst on 27 Mar 2010 07:07 Yes I'm not surprised the computation is massive. That's because you, for some reason, decided to go ahead with your original idea despite asking for and getting a more efficient way of doing it. You probably also did similar inefficient things with PixelIdxList to get your centroid and bounding box. I'm not sure why you ignored the answer you sought and went ahead with your original inefficient idea but whatever...as long as it works and you're happy. Your idea for tracking objects frame-to-frame by finding nearest centroids seems reasonable as long as the blobs don't move large distances. Luckily this will be very fast even for the brute force, non-vectorized method.
From: stephanie scicluna on 27 Mar 2010 08:08
Thanks! Well for the previous part we were told to use PixelIdxList but i found PixelList to be more efficient. The problem is we have over 300 frames each with 1 to 4 objects inside. so the computation time will be long. I did try out MeanIntensity but as we were instructed to use a certain function (best not to go off track). But i did keep your ideai n mind for future reference. I will work with the values of the centroid and the difference in distance for the time being. This will just be to match objects. Any idea regarding the motion of direction (angle)?? ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <8391bd6e-3252-4ff2-93cb-7c8de97c112b(a)g11g2000yqe.googlegroups.com>... > Yes I'm not surprised the computation is massive. That's because you, > for some reason, decided to go ahead with your original idea despite > asking for and getting a more efficient way of doing it. You probably > also did similar inefficient things with PixelIdxList to get your > centroid and bounding box. I'm not sure why you ignored the answer > you sought and went ahead with your original inefficient idea but > whatever...as long as it works and you're happy. > > Your idea for tracking objects frame-to-frame by finding nearest > centroids seems reasonable as long as the blobs don't move large > distances. Luckily this will be very fast even for the brute force, > non-vectorized method. |