match works
This commit is contained in:
parent
246525e649
commit
e2cda919ea
3
TODO
3
TODO
@ -1,6 +1,3 @@
|
||||
- test vips_match()
|
||||
|
||||
seems not to work? a coordinate is swapped somewhere
|
||||
|
||||
- quickly wrap the useful bits of mosaicing/
|
||||
|
||||
|
@ -121,6 +121,7 @@ vips_match_build( VipsObject *object )
|
||||
VipsMatch *match = (VipsMatch *) object;
|
||||
|
||||
double a, b, dx, dy;
|
||||
VipsArrayInt *oarea;
|
||||
VipsImage *x;
|
||||
|
||||
g_object_set( match, "out", vips_image_new(), NULL );
|
||||
@ -160,13 +161,22 @@ vips_match_build( VipsObject *object )
|
||||
&a, &b, &dx, &dy ) )
|
||||
return( -1 );
|
||||
|
||||
/* Output area of ref image.
|
||||
*/
|
||||
oarea = vips_array_int_newv( 4,
|
||||
0, 0, match->ref->Xsize, match->ref->Ysize );
|
||||
|
||||
if( vips_affine( match->sec, &x,
|
||||
a, -b, b, a,
|
||||
"interpolate", match->interpolate,
|
||||
"odx", dx,
|
||||
"ody", dy,
|
||||
NULL ) )
|
||||
"oarea", oarea,
|
||||
NULL ) ) {
|
||||
vips_area_unref( oarea );
|
||||
return( -1 );
|
||||
}
|
||||
vips_area_unref( oarea );
|
||||
|
||||
if( vips_image_write( x, match->out ) ) {
|
||||
g_object_unref( x );
|
||||
|
@ -492,6 +492,15 @@ vips_affine_build( VipsObject *object )
|
||||
resample->out->Xsize = affine->trn.oarea.width;
|
||||
resample->out->Ysize = affine->trn.oarea.height;
|
||||
|
||||
#ifdef DEBUG
|
||||
printf( "vips_affine_build: transform: "
|
||||
"a = %g, b = %g, c = %g, d = %g\n",
|
||||
affine->trn.a,
|
||||
affine->trn.b,
|
||||
affine->trn.c,
|
||||
affine->trn.d );
|
||||
#endif /*DEBUG*/
|
||||
|
||||
/* Generate!
|
||||
*/
|
||||
if( vips_image_generate( resample->out,
|
||||
|
Loading…
Reference in New Issue
Block a user