add hough_circle() to vipsCC and python

now exposed to Python and C++
This commit is contained in:
John Cupitt 2014-05-17 22:00:36 +01:00
parent 8f78aaa9f7
commit dc22d9c4c8
4 changed files with 28 additions and 0 deletions

View File

@ -31,6 +31,7 @@
- support 1/2/4 bit palette tiff images with alpha
- vips_system() now uses g_spawn_command_line_sync()
- added im_tile_cache_random() to help nip2
- added hough_circle() to vips7 C++ API
6/3/14 started 7.38.6
- grey ramp minimum was wrong

1
TODO
View File

@ -1,3 +1,4 @@
- fix vipsthumbnail Chicago.png, again
- can we use postbuild elsewhere? look at use of "preclose" / "written", etc.

View File

@ -329,6 +329,29 @@ int VImage::Yoffset() { return( _ref->im->Yoffset ); }
const char *VImage::filename() { return( _ref->im->filename ); }
const char *VImage::Hist() { return( im_history_get( _ref->im ) ); }
VImage VImage::hough_circle( int scale, int min_radius, int max_radius )
throw( VError )
{
VImage in = *this;
VipsImage *x;
VImage out;
if( vips_hough_circle( in.image(), &x,
"scale", scale,
"min_radius", min_radius,
"max_radius", max_radius,
NULL ) )
verror();
if( vips_image_write( x, out.image() ) ) {
g_object_unref( x );
verror();
}
g_object_unref( x );
return( out );
}
// metadata
// base functionality

View File

@ -256,6 +256,9 @@ public:
const char *filename();
const char *Hist();
// need the hough circle stuff for the rode python GUI
VImage hough_circle( int scale, int min_radius, int max_radius ) throw( VError );
// metadata
#ifndef SWIG
// base functionality