Announcement

Collapse
No announcement yet.

Counting dots in an image (birds, reindeer...)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #21
    Colour alone is never going to work, you need to look at the difference in colour between pixels in small areas of the image.
    Paul

    Having next to zero experience at this recognition stuff (zero before yesterday). I respectfully have to diagree . (For discussion purposes)

    What I would do in the geese example (sticking with Red (call it 10 for discussion puposes) (fdp) Any 10 (within a block) is a bird. In cases where red is mixed (a shared pixel call it color 5 fdp) then that color is a bird.

    Okay (thinking on the keyboard here) what about cases where where there are Reds (10's) other than geese (say flowers) then I would blow up the largest bird and count the most red pixels possible. The my algo would read:

    Code:
    For Next_Block = 1 to Some_Size Step Block_Size
     
    ' Count Pixel Colors Here:
     
    If Reds then
       If Reds > Max_Reds_in_a Bird Then Iterate Next_Block
     else
       Incr Bird_Count
    end if
     
     
    If Mixed_In_Block then
       If Mixed_In_Block_Count > Max_MIB_in_a Bird Then Iterate Next_Block
     else
       Incr Bird_Count
    end if
     
    Next_Block
    I see what you mean (now) by a more sophisticated algo now (if reasoning above is correct).

    Oh, not that it makes any difference, but all the pics shown here are .bmp's, not .jpegs. Obviously I wouldn't know if the original (posted by Chris) was a jpg or some other format (unless all digital pics are jpegs to begin with which I don't know either. Boy it seems like I don't know a lot of stuff.

    Oh well...

    ==================================
    Anyone who goes to a psychiatrist
    ought to have his head examined.
    Samuel Goldwyn
    ==================================
    It's a pretty day. I hope you enjoy it.

    Gösta

    JWAM: (Quit Smoking): http://www.SwedesDock.com/smoking
    LDN - A Miracle Drug: http://www.SwedesDock.com/LDN/

    Comment


    • #22
      nd Chris will examine in meticulous detail and find what were passing for pixels were really relics of a late cubist phase of a Picasso fugue that has been painted over by Monet.

      Chris'll run off to Christies Ebay arm and sell it promissing a share to the rest of us "when he see's us."
      Because we are all enthrall watching Michael ducking quads and unions, we don't see Chris riding off into the matrix in a Don Wasson special

      Enough. One shouldn't type late at night with a head full Ambien, killing time till the sandman calls Mild stuff Ambien but still allows some mildly interesting hallucinacions

      Off to lala land now, if I don't keel over on the way first

      =====================================
      "Human history becomes more and more
      a race
      between education and catastrophe."
      H. G. Wells (1866-1946)
      =====================================
      It's a pretty day. I hope you enjoy it.

      Gösta

      JWAM: (Quit Smoking): http://www.SwedesDock.com/smoking
      LDN - A Miracle Drug: http://www.SwedesDock.com/LDN/

      Comment


      • #23
        Originally posted by Gösta H. Lovgren-2 View Post
        ...Chris'll run off to Christies Ebay arm and sell it promissing a share to the rest of us "when he see's us."
        So whose dreams are we in now?

        Thinking again about the basic problem here with bird flocks. Had I been inside the flock (not as crazy as it sounds, as they were coming in to roost), it is likely that some birds would be close enough to take up many more pixels, which would lead to two problems, one, the algorithm would have to recognise these large blocks as birds, not aggregations of birds, two, these birds would obscure possibly many other birds. So as a useful technique maybe this sort of image analysis is better suited to a more 2-D subject, albeit still requiring high contrast. Bacterial plaque counting on Petri dishes, for example.

        Another application occurred to me yesterday as I approached the coast from a hill - counting white tops. I'm looking for a suitable observation point.

        Comment


        • #24
          Originally posted by Paul Dixon View Post
          Second, the images are JPGs.
          I don't appear to have any storage format options with this camera. Next time I will use B&W mode straight from the camera, maybe lose less info that way.

          Comment


          • #25
            Originally posted by Chris Holbrook View Post
            I don't appear to have any storage format options with this camera. Next time I will use B&W mode straight from the camera, maybe lose less info that way.
            Or if possible take the picture at the highest camera resolution. That way there'll be a lot more information available in the same scene. For example had the swallow picture been 2000 x 1500 (low res by today's standards)instead of 640 x 480, then the number of birds could have been extracted much more accurately without much more work. (Using the blowup to examine pixel colors method)

            Not that I'm any kind of photographer or have any sophisticated equipment but when I take pics I always use the highest resolution. That way if I get a pic I want to print, using PBP it's easy to just clip out the relevant section (just the kids' heads maybe) and not lose any detail. Or use PBP (which has a host of format to save to) to compress it to the size wanted for web printing (say 800x600) and they stay *very* sharp (see www.SwedesDock.com/Lavallette for examples. Most of these original pics were much higher res - 2000x1500 or higher I think). Sharper, imvho, than if they were 800x600 to start with.)

            ==================================================
            "I am ready to meet my Maker.
            Whether my Maker is prepared for the great ordeal
            of meeting me is another matter."
            Sir Winston Churchill (1874-1965)
            ==================================================
            It's a pretty day. I hope you enjoy it.

            Gösta

            JWAM: (Quit Smoking): http://www.SwedesDock.com/smoking
            LDN - A Miracle Drug: http://www.SwedesDock.com/LDN/

            Comment


            • #26
              Originally posted by Gösta H. Lovgren-2 View Post
              ...Lavalette...
              so how many people were on that beach, Gösta?

              Originally posted by Gösta H. Lovgren-2 View Post
              ...Sharper, imvho, than if they were 800x600 to start with.)
              How would you define sharpness?

              Comment


              • #27
                Originally posted by Chris Holbrook View Post
                so how many people were on that beach, Gösta?
                Actually the people in that aerial view should be a lot easier to count than the swallows (above) as they are all the same size (nearly), say 2w x 8h px and (nearly) the same color so any block that size with the (range of) total color value of pixels would be considered a person. (see Beachfront_Person.jpg attached). What that picture does is allow a reasonable handcount to check against against any computer match algo (see attached Beachfront.jpg).
                How would you define sharpness?
                Pretty much anything that looks good to these old eyes.

                ==================================
                "There is one thing certain,
                namely,
                that we can have nothing certain;
                therefore it is not certain
                we can have nothing certain."
                Samuel Butler (1835-1903)
                ==================================
                Attached Files
                Last edited by Gösta H. Lovgren-2; 30 Dec 2008, 11:00 PM.
                It's a pretty day. I hope you enjoy it.

                Gösta

                JWAM: (Quit Smoking): http://www.SwedesDock.com/smoking
                LDN - A Miracle Drug: http://www.SwedesDock.com/LDN/

                Comment


                • #28
                  That person looks pretty small to click on so here it is again enlarged.

                  ============================================
                  "It's not the size of the dog in the fight,
                  it's the size of the fight in the dog."
                  Mark Twain (1835-1910)
                  ============================================
                  Attached Files
                  It's a pretty day. I hope you enjoy it.

                  Gösta

                  JWAM: (Quit Smoking): http://www.SwedesDock.com/smoking
                  LDN - A Miracle Drug: http://www.SwedesDock.com/LDN/

                  Comment

                  Working...
                  X