我如何理解每个坐标值所需的位数是多少?

编程入门 行业动态 更新时间:2024-10-28 19:28:41
本文介绍了我如何理解每个坐标值所需的位数是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在某一点(如端点)使用折线图开始逐点记录黑色像素的坐标,例如:(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[^].

更多推荐

我如何理解每个坐标值所需的位数是多少?

本文发布于:2023-07-19 09:03:14,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1154969.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:所需   位数   坐标值

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!