I am using below ImageMagick convert thumbnail command to generate thumbnail from a high quality image, but the generated images is not clear as the original one and it is blurry and test are difficult to read.
Below is the command :-
convert -thumbnail 612x264 inputImage.gif outPutImage.gif;
Is there any quality for converet thumbnail which I am missing.
I am also attaching the input and output images link
Input Image:
Output Image:
Someone please help, thanks in advance!!!!!
Have you tried the quality parameter http://www.imagemagick.org/Usage/thumbnails/?
Related
The image is downloaded from a slide captcha and I'm trying to find the gap in this image with OpenCV.
But the gap is missing in the image opened with cv2.imshow() .
I am not familiar with PNG nor OpenCV so I'm so confused right now.
I searched a lot but found nothing useful maybe caused by using wrong keywords.
image opened with Windows Viewer:
image opened with cv2.imshow() :
I'm wondering why the same image in image viewer and OpenCV looks different and is there an easy way to locate the difference?
I am trying to read a medical imaging data which is in .tif format using Octave . It so happens that only software from https://fiji.sc/ has the ability to read the medical images I have. A sample of the image that I am referring is this one. This image is readable in.tif format only in fiji. The image can also be converted to jpg image. Only after data points is visible to other image editing software. Now the issue is , I want to load it into octave and read it - at the moment it is not possible. The imshow() function in octave is not allowing me to visualize the given .tif file.
So, if anybody has experience in reading such file formats please let me know. Thanks.
Your linked image is a 16bit grayscale image, see $ gm identify -verbose hello.tif. So lets load it into GNU Octave:
img = imread ("hello.tif");
hist (img(:), 200); # show histogram
Ah!, the main information of your image is in the range 0-600 (probably the image aquisition system used had 11 or 12bit resolution), so lets scale and print this part as color encoded (viridis) image:
imagesc (img, [0 600])
colorbar
Is this what you want? Of course we can also use a gray colormap, try: colormap gray
If this still doesn't fit your need you should really explain what you expect to see....
imread() relies on image magic to do the conversion, some versions of which can only read TIFF in 8-bit mode (giving a warning message), but when and how this happens I do not know.
It works for me using a .raw ṕicture converted to .tif in Fiji. I am specifically interested in several spectral analysis from my pictures which are taken illuminating with 660 and 850nm.
A JPEG image can be reduced in quality and, thus, in file size using ImageMagick in a way such as the following:
convert -quality 85% image.jpg image_small.jpg
How can the quality of an image be reduced such that the resulting image is below a certain file size (e.g. 3 MB)? A scenario in which this would be useful would be preparing a large number of images for upload to a site like Imgur.
I thought there was a post about this last week but can not find it. There was another here: ImageMagick: scale JPEG image with a maximum file-size
Anyway you want to use: -define jpeg:extent=400KB https://www.imagemagick.org/script/command-line-options.php#define
Out of interest your code is wrong as the input comes after convert and your quality goes before the output image.
So you want something like this:
convert image.jpg -define jpeg:extent=3000KB image_small.jpg
If you have an old version of Imagemagick it may not work that is why it is always good to include your imagemagick version in your question.
The results are a bit hit and miss on exact filesize.
I am using ghostscript and tesseract to extract text data from scanned PDFs. But the scan result for some part of the pdf is not accurate. For testing purpose, I am taking screenshot of pdf and passing it to tesseract. Below is the scenarios and the problem I'm facing.
Scenario 1:
Link to Screenshot: https://dl.dropbox.com/u/9409594/scenario_1.tif
Once I pass this image (screenshot from a 125% zoomed pdf) to tesseract, below is the result text I'm getting:
ART\CLE STANDARD
NUMBER PFUCE
Scenario 2:
Link to screenshot: https://dl.dropbox.com/u/9409594/scenario_2.tif
If I pass the above screenshot (300% zoom) to tesseract, result is good.
ARTICLE NUMBER
Below are the arguments I'm using with ghostscript and tesseract:
Ghostscript:
gswin64.exe -dNOPAUSE -dBATCH -dSAFER -sDEVICE=tifflzw -r600 -sOutputFile="C:\test\output.tiff" "C:\test\input.pdf"
Tesseract:
tesseract.exe "c:\test\output.tif" "c:\test\output.html" -l eng -psm 6 hocr
From my testing, I feel that if a zoomed version of image is passed to tesseract, result is good. Can I zoom the image using ghostscript before converting it into image? Or is there a better way to do this?
Appreciate your time and help!
You can try this,
http://www.fmwconcepts.com/imagemagick/textcleaner/index.php
You may be aware of this, related to taking screen shot, instead of taking screen shot you can try convertion of pdf to tif using convert command of imagemagik or if its multiple page pdf use pdftoppm and then to tif using convert command.
I am trying to merge a splash screen image which is in jpg format with an ajaxloader which is in gif format.
I tried the following command using ImageMagik:
convert -delay 50 splashimage.jpg ajaxloader.gif final.gif
This command does merge the gif file with the jpg image but the loader appear at the top-left corner.
I was wondering if there is an option available to place it at a specfic (x,y) point on the jpg image?
If anybody has had done a similar thing or has an idea as to how a similar thing can be achieved, please guide me through.
Thanks.
Why would you want to do this? You'd be turning a nice 24bit JPG into a crappy quality single frame on an 8bit gif. You could just use some CSS tricks to overlay the loader .gif on top of the .jpg on a webpage, which would not sacrifice any image quality to achieve the same effect.
I solved the problem by designing individual frames of images with the desired location of my text and merged them using Imagemagik.