Link to home
Start Free TrialLog in
Avatar of inampudi1
inampudi1

asked on

how to get pixels

Hi experts,

I am drawing (colored lines) scribbles on the image, How can I get the  pixel values(ie x and y) inside the selected area. I have got points( x and y) for selected area. I have attache bmp file containing selection pl see.

 I need each and every point inside selected area.
test.bmp
Avatar of Peter Hart
Peter Hart
Flag of United Kingdom of Great Britain and Northern Ireland image

Hi, here are 2 tutorials on how to do this manually.  I personally use dreamweaver which can produce the coordinates automatically.
you'll need to set up a polygon:

http://www.elated.com/articles/creating-image-maps/
http://www.javascriptkit.com/howto/imagemap.shtml
Avatar of inampudi1
inampudi1

ASKER

Hi,

I need some algorithm  to get [x,y] valuesas into a unsigined char*.......Here some code is their  in java. is their any algorithm for that?
Hi,

   Here my selected area may not be  exactly rectangle or triangle or hexagonal, it may be irregular shape also.

But I need all  pixel values inside my selection. Here I have input as co-ordinate values of border of selected area.
you will have to look at how HTML does it.  its done by html
for instance a circle would something like:
<map name="Map"><area shape="circle" coords="50,18,9" href="test.asp">
</map>
and placed at the end of the html page.  All we know is the centre of the circle and the raduis
another example:  html does the rest.

http://www.december.com/html/demo/imagemap.html
hi,

   Actually I dont no HTML, and I have to get inside pixel values in to a  variable  and I need to pass it to some other function in my application. Is their any other way....or how can I use your method for iregular shapes , as I showned in attached image.

Hi,


Here I am working on delphi ... if any algorithm is their means I can implement it.
ASKER CERTIFIED SOLUTION
Avatar of Geert G
Geert G
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
hi

I got the solution now it is working fine.