Commit d1baa02a authored by Robert's avatar Robert Committed by Robert Ohmacht

- unbenutzten Code entfernt (pyramid.py)

- 'Verdrehung' der aktuell erlangten Scankachel wird jetzt erst beim Schreiben in die Anzeigekachel berichtigt (pyramid.py, opticalscan.py)
parent 38cd9c6e
......@@ -110,22 +110,10 @@ def loadAndPasteImage(srcnames, tilepath, index, pyramid, fullzval, width, heigh
#dst = fullimage
zval = fullzval
# M_rot = np.float32([[c, s], [-s, c]])
M_rot = cv2.getRotationMatrix2D((img.shape[1]/2, img.shape[0]/2), rotationvalue, 1)
img_rot = cv2.warpAffine(img, M_rot, (img.shape[1], img.shape[0] + 10), borderMode=cv2.BORDER_TRANSPARENT)
#cv2imwrite_fix(
# os.path.join(tilepath, f"tile_{index}.bmp"),
# cv2.cvtColor(img_rot, cv2.COLOR_RGB2BGR)
#)
# calc new pixel start coords for tile
# @see https://stackoverflow.com/a/43166421/9880753
c_dest = cv2.transform(np.float32([[(0, 0)]]), np.float32([[c, s, dx], [-s, c, dy]]))
pyramid.addSrcTile(
img_rot,
(c_dest[0][0][0], c_dest[0][0][1]),
img,
np.float32([[c, s, 0], [-s, c, 0]]),
(dx, dy),
(Nx, Ny)
)
else:
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment