E eastweast Unregistered / Unconfirmed GUEST, unregistred user! 2002-03-28 #1 我有两张扫描后的图片,都是同一张照片,可是第二张 跟第一张相比图像旋转了一定的角度,或许位置也有偏移, 如何用程序实现校正后两张图片完全吻合,有没有什么好 的算法?
D D影子D Unregistered / Unconfirmed GUEST, unregistred user! 2002-03-28 #2 //水平翻转的例子,供参考 var dummyimage:timage; x,y:integer; srcrect,dstrect:trect; begin x:=image1.picture.width; y:=image1.picture.height; dummyimage:=timage.create(self); try srcrect:=rect(0,0,x,y); dstrect:=rect(x,0,0,y); dummyimage.width:=x; dummyimage.height:=y; dummyimage.canvas.copymode:=cmsrccopy; dummyimage.canvas.copyrect(dstrect,image1.canvas,srcrect); image1.picture:=dummyimage.picture; finally dummyimage.free; end; end;
//水平翻转的例子,供参考 var dummyimage:timage; x,y:integer; srcrect,dstrect:trect; begin x:=image1.picture.width; y:=image1.picture.height; dummyimage:=timage.create(self); try srcrect:=rect(0,0,x,y); dstrect:=rect(x,0,0,y); dummyimage.width:=x; dummyimage.height:=y; dummyimage.canvas.copymode:=cmsrccopy; dummyimage.canvas.copyrect(dstrect,image1.canvas,srcrect); image1.picture:=dummyimage.picture; finally dummyimage.free; end; end;
卷 卷起千堆雪tyn Unregistered / Unconfirmed GUEST, unregistred user! 2002-03-28 #3 看看这里两个帖子的讨论 : 就是图象的旋转问题 http://www.delphibbs.com/delphibbs/dispq.asp?lid=1003922 http://www.delphibbs.com/delphibbs/dispq.asp?lid=998339
看看这里两个帖子的讨论 : 就是图象的旋转问题 http://www.delphibbs.com/delphibbs/dispq.asp?lid=1003922 http://www.delphibbs.com/delphibbs/dispq.asp?lid=998339