简体   繁体   English

加入图像后找到新坐标

[英]find new coordinates after joining the images

I have 25 images with the coordinates (x,y) and images are of size 128*128 .我有 25 张坐标为 (x,y) 的图像,图像的大小为128*128 SO I am joining the images and new the image size would be 640 * 640 .所以我加入了图像,新的图像大小为640 * 640 I want to find out the new coordinates of (x,y)我想找出 (x,y) 的新坐标

I tried something like我试过类似的东西

#w,h of the new image i.e 640 , 640
#imw,imh of the old image i.e 128*128
#x,y old coordinates
  
newx = int(( w * x )/ imw)
newy = int(( h * y )/ imh)

Small image (i, j) to large image:小图像(i, j)到大图像:

X = 128 i + x, 
Y = 128 j + y

Large image to small:大图到小图:

i = X / 128,
j = Y / 128,
x = X mod 128,
y = Y mod 128

(with integer division). (带整数除法)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 调整图像大小后查找点的新坐标 - Find new coordinates of a point after image resize 裁剪图像后,如何找到新的边界框坐标? - After cropping a image, how to find new bounding box coordinates? 图像旋转后如何获取新坐标? - How to get a new coordinates after image rotation? 比较两个图像并找出所有不同的像素坐标 - Compare two images and find all pixel coordinates that differ 当我已经有旧图像大小新图像大小和多边形坐标时查找新的多边形坐标 - Find new Polygon Coordinates when I already have Old Image Size New Image Size and polygon Coordinates OpenScad - 如何在旋转后找到机器人 Arm 节点坐标 - 5 轴 - OpenScad - How to find Robotic Arm Nodes Coordinates after Rotations - 5 axis Python PIL-在数组中连接图像 - Python PIL - Joining images in an array 用pyvips连接多个巨大的图像 - Joining multiple huge images with pyvips 为出现在第一张图像中的每个对象的像素在其他图像中找到正确的坐标 - find the correct coordinates for every object's pixels appearring in first image in the other images 使用 MaskRcnn 从 model.detect() 之后的图像中获取预测掩码的 x,y 坐标 - Getting the x,y coordinates of the predicted masks from the images after model.detect() with MaskRcnn
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM