在某一点(如端点)使用折线图开始逐点记录黑色像素的坐标,例如:(3,6),(4,7),(5,7),( 6,6),(7,5),(8,5),(9,5),(10,4),(10,3),(9,2)。 随着这种方式存储线图,每个黑色像素存储两个坐标(x,y),他需要存储坐标值和图像大小的数量。 例如,如果图像尺寸为512 * 512像素,则每个坐标值用九个二进制表示。 为什么回答是9 ???
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???
推荐答案只需使用标准 int 每个数字的类型,您将涵盖大多数基数。 Windows API具有 POINT 结构 [ ^ ]保存这些值,.NET有另一个 Point 结构 [ ^ ]。 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[^].
更多推荐
我如何理解每个坐标值所需的位数是多少?
发布评论