关于PNG图像在CAD中的换算比例

    xiaoxiao2021-03-29  37

    背景

    简单介绍一下,最近做了一个点云切片管理的小工具,点云切片来自于JRC软件导出的PNG图像和scr文件,而PNG的dpi会不一样,而scr描述文件里却只有一个缩放因子,所以在内部做处理时比较麻烦,无法获取图像实际所占位置。

    scr文件

    ;JRC Reconstructor orthophoto import command sequence into AutoCAD ;This script imports the orthophoto "limian_5_002_hjz.png" into AutoCAD, keeping the original orthophoto size in meters. ;The position and orientation that the orthophoto had in Reconstructor is also exported to AutoCAD. ;Furthermore, a new UCS called "UCS_from_limian_5_002_hjz" will be created in AutoCAD, ;with the same position and orientation of the orthophoto. ;A new layer called "limian_5_002_hjz" will be created in AutoCAD to contain the orthophoto. ;The length measure unit selected for this script is Meters. ; ;----------------------------------------script (setq old-insunits (getvar "insunits")) insunits 6 (setq old-osmode (getvar "osmode")) _osmode 0 _ucs _w _ucs _na _d "UCS_from_limian_5_002_hjz" _ucs _3 21.290760281751879,8.6897138827298299,-1.6033916170721909 20.290760281751879,8.6897138827298299,-1.6033916170721909 21.290760281751879,8.6897138827298299,-0.60339161707219091 _ucs _na _s "UCS_from_limian_5_002_hjz" _plan _c _layer _m "limian_5_002_hjz" _c 140 "limian_5_002_hjz" _plan _c -image _A "limian_5_002_hjz.png" 0,0,0 2.00000000000(此处为缩放因子) 0 (setvar "osmode" old-osmode) (setvar "insunits" old-insunits) _qsave ;-------------------------------------endscript ; ;GEXCEL

    通过切8000,10000,12000三个长度的切片,最后测试得到换算大概是

    实际长度(厘米)=像素 * 0.0264550265 * 缩放因子

    转载请注明原文地址: https://ju.6miu.com/read-664870.html

    最新回复(0)