Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Discrepancy between AffineTransformOp.filter() and AffineTransformOp.getPoint2D()  RSS feed

 
Arsen Liapin
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, guys!

I faced some discrepancy between transformations made with help of AffineTransformOp.filter() and AffineTransformOp.getPoint2D()

So, this is the way to reproduce it: let's say we have black image 512x512 pixels, I am placing one pixel to (162, 216) point on this image, then make some transformations with help of AffineTransformOp over this image.
From other side - I have one POI (point of interest) with same coordinates as pixel above, but it stored separately in my application. When I apply same AffineTransformOp to this POI - the result will not match.

Testcase to reproduce it below:



I believe this is because of different arguments: for image rotation - calculations done over integers, for Point2D rotation calculation done over double/floats.
Wanted to debug AffineTransformOp, but IDE(using IDEA 12) did not stop on breakpoint in this class. Can someone suggest - why is this ?

Thanks!
 
Arsen Liapin
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
looks like those transformations are in native code and platform-dependent
should check this test in Linux...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!