imagemagick-convert

Unable to create NDVI image using ImageMagick

会有一股神秘感。 提交于 2019-12-25 09:03:05
问题 I have four separate images - 2-projected.tif, 3-projected.tif, 4-projected.tif and 5-projected.tif. These are four Landsat images. Image 2-projected.tif corresponds to blue channel, image 3-projected.tif - to green channel, image 4-projected.tif - to red channel, and 5-projected.tif - to infrared. Now I want to create NDVI image. To do this, I first create a combined RGB image, using ImageMagic: $ convert 4-projected.tif 3-projected.tif 2-projected.tif -combine RGB.tif So far, so good. And

How do I find the largest nearly white rectangle in a bitmap with ImageMagick?

点点圈 提交于 2019-12-25 02:46:55
问题 I'd like to automatically clean up visible borders/shadows in scanned pages. My idea for doing this is simple: detect a largest rectangle in the image in which all pixels are white or nearly white, then crop the image to that rectangle or floodfill the exterior with white. I can write my own program for finding such a rectangle, but I'd prefer to use ImageMagick (which can also do the cropping or floodfilling), netpbm, or other utilities readily available for Linux and Cygwin. Can they do

Imagemagick not creating correct color

女生的网名这么多〃 提交于 2019-12-25 02:25:37
问题 So I when I rung this command: convert -size 32x32 xc:transparent -fill "#ff0000" \ -draw "circle 15,16 8,10" png32:"/Users/rzec/test test.png" a round circle is created however the color is not FF0000 but it is #FC0F1D . Is there any reason this would happen? Interestingly, if I use FFFFFF that is the color that is generated. I am running Mac OS X 10.9 and ImageMagick 6.8.7-7 Q16 x86_64 2013-11-27 来源: https://stackoverflow.com/questions/24862041/imagemagick-not-creating-correct-color

Imagemagick command geometry not working

点点圈 提交于 2019-12-24 19:23:26
问题 I am having image1.jpg with the size of 350x500 and another image2.png ( 350x150 ) with gradient effects like shadow. I need to apply the shadow to image1.jpg in its bottom. But geometry doesn't work for me. convert -extent 600x700\! image1.jpg \( image2.png -geometry +0+500 \) -composite final.png I hope the geometry will position an image at the point I have given, If I am right, geometry is not working for me. 回答1: Not certain what you are trying to achieve, but is this close: convert xc

How to undo or remove the drawn rectangle using Convert?

安稳与你 提交于 2019-12-24 18:35:55
问题 I have used convert this to draw a rectangle on image now i want to undo this the how? help? convert Image1.jpg -fill black -draw "rectangle 135,55 155,60" Image2.jpg 回答1: Once you draw a rectangle onto an image, it has replace the pixels in the image with the color of rectangle. You cannot undo that. You can replace the color of the rectangle with some interpretation of the image pixels nearby using morphology techniques in Imagemagick by making a mask from the same rectangle and using that

How to rotate a composite image with fixed center?

我怕爱的太早我们不能终老 提交于 2019-12-24 14:29:50
问题 So, I have this background image: And I have a 1px x 1px image that I want to overlay on that. If I run: convert bg.png \( -size 80x240 -background none -rotate 30 -geometry +120+88 tile:red.png \) -composite result.png I get this: But I want to rotate it with fixed center. The expected result should be something like this: Do you know how can I accomplish that? Thank you. 回答1: Looking into the comment by @frostyterrier I think his problem is he needs +distort and is using -distort? This page

Error in calling ImageMagick from Matlab

一世执手 提交于 2019-12-24 12:39:39
问题 I have installed ImageMagick in my system (windows), and its commands are there in system PATH. Its working absolutely fine through Command line I want to call the "convert" function of ImageMagick from Matlab using system command. 'C:\Users\Vivek' is the Path to image. I have to test working of ImageMagick through Matlab, as i need it in further processing (Making input suitable to Tesseract OCR) cmd= ['convert ' 'C:\Users\Vivek\208.jpg ' 'C:\Users\Vivek\208.png'] system(cmd); It says

Image Magick++ equivalent to convert -fill

孤人 提交于 2019-12-24 11:51:14
问题 I have a convert command that I need to translate into Image Magick function calls. convert.exe bar.jpg -fuzz 40% -fill "rgb(53456, 35209, 30583)" -opaque "rgb(65535, 65535, 65535)" foo2.jpg I was wondering if anyone could give me an example of the methods I need to apply to get the same effect? Thanks for any help! 回答1: The documentation for Magick++ is pretty clear, but there's a lot more examples using c & MagickWand. For the most part, -fill is just setting a color attribute that can be

scons: How to deal with dynamic targets?

廉价感情. 提交于 2019-12-24 02:55:17
问题 I'm trying to automate my work of converting PDF to png file with scons . The tool used for my conversion is convert from ImageMagick . Here's the raw command line: convert input.pdf temp/temp.png convert temp/*.png -append output.png The first command will generate one PNG file for each page in PDF file, so the target of the first command is a dynamic file list. Here's the SConstruct file I'm working on: convert = Builder(action=[ Delete("${TARGET.dir}"), Mkdir("${TARGET.dir}"), "convert

Porting 'sh 1.11'-based code to Windows

久未见 提交于 2019-12-23 17:16:18
问题 All signs seem to indicate that my script is fully operational within a Linux environment and as far as I can tell, the only thing keeping it from working in Windows is my usage of sh, which is pretty straightforward: from sh import convert convert(inputfile, '-resize', r, '-quality', q, '-strip', outputfile) This translates to a bash line: convert image.jpg -resize 350x350 -quality 80 -strip ./small/export.jpg where the r and q variables are any given resolution or quality. Running this in