Results 1 to 11 of 11

Math Help - matlab - image analysis - count objects

  1. #1
    Newbie
    Joined
    Jan 2010
    Posts
    2

    matlab - image analysis - count objects

    hello everyone

    i have an image which contains 1's and 0's. i want to identify them somehow and then write them to an array. I figure out that it must have something to do with edge detection and bwmorph operations, but i am lost. Have you got any idea, how to do this? it 's the first time i 'm using matlab...
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by rigas View Post
    hello everyone

    i have an image which contains 1's and 0's. i want to identify them somehow and then write them to an array. I figure out that it must have something to do with edge detection and bwmorph operations, but i am lost. Have you got any idea, how to do this? it 's the first time i 'm using matlab...
    See the imread help

    CB
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Jan 2010
    Posts
    4
    hello,

    i have the same problem, but i cant seem to find a way to do it just by reading this help file, could you give us a little more help plz?

    thx in advance
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by vaulthread View Post
    hello,

    i have the same problem, but i cant seem to find a way to do it just by reading this help file, could you give us a little more help plz?

    thx in advance
    Where is you image data?

    CB
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    Jan 2010
    Posts
    4
    i used this example

    Example 2 - Analyzing Images :: Getting Started (Image Processing Toolbox™)

    until the use of the function "bwconncomp" with connectivity parameter 8.

    The result is a variable cc with NumObjects 27, which is the amount of all the numbers, both 0's and 1's.

    Am I on the right way?

    My problem is now how do i distinguish which objects is 0 and which is 1, and then count em, and then write the result to a text file.

    <sorry for being a newbie but ive never used matlab before>
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by vaulthread View Post
    i used this example

    Example 2 - Analyzing Images :: Getting Started (Image Processing Toolbox™)

    until the use of the function "bwconncomp" with connectivity parameter 8.

    The result is a variable cc with NumObjects 27, which is the amount of all the numbers, both 0's and 1's.

    The 27 is the number of forground objects detected, that is it would be rice grains if they were all resolved, and is groups of rice grains.

    CB
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Newbie
    Joined
    Jan 2010
    Posts
    4
    Hi again, i need a little help,

    using the regionprops function i was able to get a lot of data for my numbers<"grains!;p">.

    Using BoundingBox measurement, i have the topleft corner coordinates of each "number".
    How can i compare these values so i can put the "numbers" in order?
    I need this is so i can make an array of the characters and then put it into a text file.

    (because after i used bwconncomp, the "numbers" are not in the right order.)
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Newbie
    Joined
    Jan 2010
    Posts
    1
    Goodmorning everyone! I have the same problem as above. Could anyone probably give me a little help about turning the image with "0" and "1'' in a text file?
    Thanks in advance
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by candy486 View Post
    Goodmorning everyone! I have the same problem as above. Could anyone probably give me a little help about turning the image with "0" and "1'' in a text file?
    Thanks in advance
    Follow the link in post #2 in this thread.

    CB
    Follow Math Help Forum on Facebook and Google+

  10. #10
    Newbie
    Joined
    Jan 2010
    Posts
    4

    Order

    when we have used bwconncomp, we generate a list of items inside our image,
    how can we arrange that list so the items are from top to bottom and left to right, something like reading?

    ive used the regionprops function and probably it has something to do with the extrema option but i still cant figure it out, could you plz tell me?
    Follow Math Help Forum on Facebook and Google+

  11. #11
    Newbie
    Joined
    Feb 2010
    Posts
    1
    Hi, i have the same problem with the other guys too.The image is attached.
    First i want to count how many 0 and 1 are in the image and secondly i want
    to turn the image with 0 and 1 in txt fil (without counting blanks and rows)
    Tnx
    Attached Thumbnails Attached Thumbnails matlab - image analysis - count objects-01.jpg  
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Pre-Image / Image proof
    Posted in the Differential Geometry Forum
    Replies: 1
    Last Post: March 9th 2012, 03:30 AM
  2. Complex analysis, find the image of a transformation
    Posted in the Differential Geometry Forum
    Replies: 2
    Last Post: July 14th 2010, 11:54 AM
  3. A problem with matlab image analysis
    Posted in the Math Software Forum
    Replies: 0
    Last Post: April 13th 2010, 08:55 AM
  4. (Matlab) Image processing - Detect multiple circle
    Posted in the Math Software Forum
    Replies: 3
    Last Post: April 15th 2009, 09:09 AM
  5. How to count?
    Posted in the Math Challenge Problems Forum
    Replies: 3
    Last Post: October 7th 2008, 05:17 AM

Search Tags


/mathhelpforum @mathhelpforum