comparison Framework/Toolbox/ImageGeometry.cpp @ 191:46cb2eedc2e0 wasm

ShearWarpProjectiveTransform
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 16 Mar 2018 15:01:52 +0100
parents 465b294a55f0
children e9c7a78a3e77
comparison
equal deleted inserted replaced
190:465b294a55f0 191:46cb2eedc2e0
204 if (GetProjectiveTransformExtent(x1, y1, x2, y2, a, 204 if (GetProjectiveTransformExtent(x1, y1, x2, y2, a,
205 source.GetWidth(), source.GetHeight(), 205 source.GetWidth(), source.GetHeight(),
206 target.GetWidth(), target.GetHeight())) 206 target.GetWidth(), target.GetHeight()))
207 { 207 {
208 const size_t targetPitch = target.GetPitch(); 208 const size_t targetPitch = target.GetPitch();
209 uint8_t *targetRow = reinterpret_cast<uint8_t*>(reinterpret_cast<PixelType*>(target.GetRow(y1)) + x1); 209 uint8_t *targetRow = reinterpret_cast<uint8_t*>
210 (reinterpret_cast<PixelType*>(target.GetRow(y1)) + x1);
210 211
211 for (unsigned int y = y1; y <= y2; y++) 212 for (unsigned int y = y1; y <= y2; y++)
212 { 213 {
213 Vector start; 214 Vector start;
214 LinearAlgebra::AssignVector(start, static_cast<double>(x1) + 0.5, 215 LinearAlgebra::AssignVector(start, static_cast<double>(x1) + 0.5,
380 if (GetProjectiveTransformExtent(x1, y1, x2, y2, a, 381 if (GetProjectiveTransformExtent(x1, y1, x2, y2, a,
381 source.GetWidth(), source.GetHeight(), 382 source.GetWidth(), source.GetHeight(),
382 target.GetWidth(), target.GetHeight())) 383 target.GetWidth(), target.GetHeight()))
383 { 384 {
384 const size_t targetPitch = target.GetPitch(); 385 const size_t targetPitch = target.GetPitch();
385 uint8_t *targetRow = reinterpret_cast<uint8_t*>(reinterpret_cast<PixelType*>(target.GetRow(y1)) + x1); 386 uint8_t *targetRow = reinterpret_cast<uint8_t*>
387 (reinterpret_cast<PixelType*>(target.GetRow(y1)) + x1);
386 388
387 for (unsigned int y = y1; y <= y2; y++) 389 for (unsigned int y = y1; y <= y2; y++)
388 { 390 {
389 PixelType *p = reinterpret_cast<PixelType*>(targetRow); 391 PixelType *p = reinterpret_cast<PixelType*>(targetRow);
390 392