solo7773 has asked for the wisdom of the Perl Monks concerning the following question:

Simply speaking. There are some seeds, I take a photo of them, then, I want to group those seeds with a program.

I want to work it out by read the longest length measured parallel and longest width measured vertical, if the picture's format is bmp, I think I can know its size(arithmetic product of length and width) by translate pixel coordinates. I hope it will help me, actually, it's very hard to do. I ask for your help, no matter what advise you give me, thanks.

You can see a sample picture here, http://imagebin.org/150587.

Replies are listed 'Best First'.
Re: Image Operation
by locked_user sundialsvc4 (Abbot) on Apr 27, 2011 at 13:17 UTC

    Since your teacher asked you to do this, it is most appropriate for you to do some research yourself.   These days, “Google it” and work from there, or better yet find a book of image processing algorithms.   Then, put your teacher in the loop.   Discuss your ideas, ask for pointers and suggestions.   The whole idea of such an exercise is to help you to learn how to discover an algorithm that will address a non-trivial problem.   In order to get what you (or someone else) are paying for, you need to be the one to make the discovery and your teacher needs to be the one to help you as necessary to do it.   The day will soon come when you are asked to solve problems of this sort and you won’t have the valuable resource of a dedicated instructor at your disposal.

    I have, of course, been a college instructor myself, and I can tell you that I was delighted when a student came to me with a well-prepared question.   I knew that such a student would succeed, in the class and in a lot of other things in life too.

    Remember:   when dealing with a problem like this, you can assume that a suitable solution exists, and that your purpose (unless your instructor clearly states otherwise) is to discover your choices and then to select from among them.

Re: Image Operation
by anonymized user 468275 (Curate) on Apr 27, 2011 at 12:50 UTC
    I suspect problem needs more clarity - is length and width measured parallel to the paper or indicated by the longest and narrowest diameters of each spot? What rule determines membership of each group? And anyway, what does size mean - shoe size? length? area? volume (if the spots are thick)? And I wonder whose fault is it that the problem is so vaguely expressed. If it's yours, get the proper version, otherwise get a proper teacher.

    Update: When changing a post, please use "strike" tags rather than actually deleting and replacing, or just add update like this, otherwise you undermine people's replies.

    We still need to know what "group" means in this context. It could be integral square millimetres, quarter inches squared, or in fact anything you like of that sort.

    One world, one people

Re: Image Operation
by BrowserUk (Patriarch) on Apr 27, 2011 at 16:37 UTC

    Can you post an example image somewhere?


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.