Click here to Skip to main content
15,880,725 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
With line graph line at some point (such as an endpoint) began to record the coordinates of black pixels point by point, such as:(3,6),(4,7),(5,7),(6,6),(7,5),(8,5),(9,5),(10,4),(10,3),(9,2)。
With this way to store line diagram,each black pixel to be stored two coordinates(x,y),he number required to store a coordinate values and the size of the image.
For example, if an image size is 512 * 512 pixels, each coordinate values are represented with nine binary.

Why answer is 9???
Posted
Comments
Andy Lanng 30-Oct-15 10:18am    
depends on the image format. Depends on the channels. Depends what you mean by 9 binary. It depends on many things you have not included in the question.
Philippe Mori 30-Oct-15 13:49pm    
Log2 512 = 9.
Basic mathematics everyone should know...

1 solution

Just use a standard int type for each number and you will cover most bases. Windows API has the POINT structure[^] to hold these values, and .NET has the other Point structure[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900