Page 1 of 1

how to set the pixel outside image ? virtual pixel magick++

Posted: 2007-07-19T06:10:20-07:00
by EA_User
Hello,

I try to use magick++ for basic convolution and similarity measures for pixel.

My question is how can i set the implicite values for pixel outside the image ?
How can i set it to "mirror/reflexion signal", "copy signal from nearest pixel" and other basic implicits considerations ?
I read some documentation on web but i don't found or understand how to set it for magick++.



Sorry if the question was already discuss (i don't found it), and for my english.

Re: how to set the pixel outside image ? virtual pixel magick++

Posted: 2007-08-09T19:20:11-07:00
by anthony
the setting is called -virtual-pixel, and you can list the posible settings using

Code: Select all

   convert -list virtual-pixel
For a exampled summery see...

http://www.imagemagick.org/Usage/misc/#virtual

I am not positive this is used for -convolve but it is used for -blur and -gaussian. It is also vital for image distortions and -fx lookups that 'miss' the image proper, as you can see by the above examples.

The other alternative is to expand your image to surround the edges of the image with some pattern of your own choice.


I have not added much for convolution in IM Examples yet, not even a discussion of 'neighbourhoods' and standard distribution curves common to these type of functions. See
http://www.imagemagick.org/Usage/convolve
If you like to help prehaps you can contribute some info or section on convolution in IM, what it does and how you can use it (with appropriate small examples).

WARNING: As I have not tested -convolve much, there may be bugs or features I don't know about, or have yet discovered, caution is recommended.

Re: how to set the pixel outside image ? virtual pixel magick++

Posted: 2007-08-13T03:40:52-07:00
by EA_User
Thank for reply,
But I already read your (usefull) exemples for magik as command line tools.
Here my subject is for magick++ : how can i use properly these technics in c++ program ?

For magik wand, there are something relative to virtual pixel too, but i don't found it with magik++.

Re: how to set the pixel outside image ? virtual pixel magick++

Posted: 2007-08-13T16:40:49-07:00
by anthony
It will be present somewhere. Hmmm...
From the command line API source file "wand/mogrify.c" search for "virtual-pixel" It calls the MagickCore Library procedure SetImageVirtualPixelMethod().
Magick++ should have something simular if not the same