桌面上与图像上的点相对应的点 [英] a point on the desktop corresponding to a point on an image

查看:101
本文介绍了桌面上与图像上的点相对应的点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好
我有一个桌面图像,图像尺寸小于桌面尺寸
如何在桌面上找到与图像中的点相对应的点?

hi all
i have an image of the desktop,the image size is smaller than the desktop size
how can i find a point on the desktop corresponding to the a point in the image

推荐答案

请参阅我对问题的评论.在这两种情况下,对于应届毕业生而言,这都不是问题.这意味着线性方程组的解决方案对中学生或初中生都有效(取决于您的学校系统,但要求的水平大大低于大专,大学或技术学校学生的入学水平).减少了解决像
这样的方程式的能力
Please see my comment to the question. In both cases, this is not a problem for gradate students. It means the solution of linear equations which is a work for middle school or early high school student (it depends on your school system, but it requires level well below the required entry level of a college, university or a technical school student). It''s reduced to the ability to solve equations like

<br />
X<sub>1</sub> = X<sub>0</sub> + K × X<sub>2</sub><br />
Y<sub>1</sub> = Y<sub>0</sub> + K × Y<sub>2</sub><br />



醒来并解决它们.

—SA



Wake up and solve them.

—SA


假设您在图像上相对于图像的左上角有一个点(相对于图像坐标而言),那么这很简单缩放比例:

X 桌面 = X 图像 *(宽度桌面/宽度图像)

Y 桌面 = Y 图像 *(高度桌面/高度图像)

显然,您不一定要精确到该点-取决于相对大小,会出现一两个像素的误差.
Assuming you have a point on the image relative to the top left hand corner of the image in terms of image coordinates, then it is a simple matter of scaling:

Xdesktop = Ximage * (Widthdesktop / Widthimage)

Ydesktop = Yimage * (Heightdesktop / Heightimage)

Obviously, you won''t necessarily get to exactly that point - there will be an error of a pixel or two depending on the relative sizes.


让图像上点的坐标为x ,y.这样您在桌面上的对应点就会像这样.

新点=新点(x *桌面宽度/图像宽度,y *目标高度/图像高度)

从理论上讲,但是我希望您能理解我的意思.如果您不回答,则答复.
Let the coordinates of point on image be x,y. Then your corresponding point on desktop will be like this.

new point = new point(x* Desktopwidth/imagewidth,y*Desktopheight/imageheight)

This is in theory, but i hope you get my point. If you don''t then reply.


这篇关于桌面上与图像上的点相对应的点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆