@snibgo
Worked like a charm. Thanks for the help guys!
Search found 16 matches
- 2019-03-26T12:39:58-07:00
- Forum: Users
- Topic: Extracr B&W ratio in order to "target" images
- Replies: 11
- Views: 24090
- 2019-03-25T10:48:00-07:00
- Forum: Users
- Topic: Extracr B&W ratio in order to "target" images
- Replies: 11
- Views: 24090
Re: Extracr B&W ratio in order to "target" images
Hey @snibgo! This is exactly what I need to filter the images. I applied like this: magick *.jpg -threshold %[fx:240/255*100]% -format %[fx:(1-mean)*100] info: >list.txt So that all the information was transfered to a .txt file, but the spacing was all wrong: 19.308218.20919.348718.994419.587417 ...
- 2019-03-25T07:40:40-07:00
- Forum: Users
- Topic: Extracr B&W ratio in order to "target" images
- Replies: 11
- Views: 24090
Re: Extracr B&W ratio in order to "target" images
@fmw42 The input and output are on this folder https://drive.google.com/drive/folders/1qT8Zv2E0qsYcGk0UsYT3u9B3Ga-PZm39?usp=sharing : And here is the code applied: convert 0108_example.jpg -type Grayscale -threshold 35% -define connected-components:area-threshold=3 -define connected-components:mean ...
- 2019-03-25T07:07:24-07:00
- Forum: Users
- Topic: Extracr B&W ratio in order to "target" images
- Replies: 11
- Views: 24090
Re: Extracr B&W ratio in order to "target" images
Here's the target image: https://drive.google.com/open?id=1wQN8Q8UFtTF93Mne2o6baOe36w3RdaVO And these are the ones I'm trying to preserve: https://drive.google.com/open?id=1xlyE5MVSA5b_VjDJILyhDTSi-3Jok393 https://drive.google.com/open?id=1vmJvPZJUes27p6ZJm5fOje6wEVAu5IPg Here's the histogram data ...
- 2019-03-22T13:37:50-07:00
- Forum: Users
- Topic: Extracr B&W ratio in order to "target" images
- Replies: 11
- Views: 24090
Extracr B&W ratio in order to "target" images
Hello everyone! I need to "target" some images in order to batch convert them with the following code (made with fmw42's amazing guidance): convert 0001.jpg -type Grayscale -threshold 35% -define connected-components:area-threshold=3 -define connected-components:mean-color=true -connected-components ...
- 2019-03-22T11:48:32-07:00
- Forum: Users
- Topic: Grayscale background removal for OCR
- Replies: 4
- Views: 8000
Re: Grayscale background removal for OCR
Hey fmw42! Worked like a charm. After some tweaks with the threshold and the area for connected components, the code is good enough for OCR reading. No need to remove the black line, it does not interfere. Thanks for the help! Final code: convert 0001.jpg -type Grayscale -threshold 35% -define ...
- 2019-03-20T08:52:47-07:00
- Forum: Users
- Topic: Grayscale background removal for OCR
- Replies: 4
- Views: 8000
Re: Grayscale background removal for OCR
Hello again fmw42! Here's what I did, since my problem differs a little: Removed the lines that concern trimming, thinning and border color. It went something like this: convert 0068_example.jpg -type Grayscale ^ -fuzz 22% ^ -define connected-components:remove=0 ^ -define connected-components:mean ...
- 2019-03-19T12:34:02-07:00
- Forum: Users
- Topic: Grayscale background removal for OCR
- Replies: 4
- Views: 8000
Grayscale background removal for OCR
Hello everyone! I'm having the following issue: I need to prepare a huge quantity of images for OCR reading. Problem is, the information is written in a part of a document that has a grayscale background. Also, the scanner that produced this image did so in color, so when the OCR tries to read it ...
- 2019-02-22T14:56:50-07:00
- Forum: Users
- Topic: Dynamic removal of black background
- Replies: 14
- Views: 14945
Re: Dynamic removal of black background
Hey fmw42! Just to clarify, these images were crops (printscreens) of sections of the results the last code gave me. The green areas are transparencies, and I've left them like that just as a visual cue for what happened, since the it seems the "open morphology" command made holes of transparency ...
- 2019-02-14T06:28:52-07:00
- Forum: Users
- Topic: Dynamic removal of black background
- Replies: 14
- Views: 14945
Re: Dynamic removal of black background
Actualy, the green is just the visualisation option from IrphanView. Since these images are PNG and the background is transparent, I just made it so the IrphanView showed this green background in order to see a better contrast. The help you gave so far is already amazing, way beyond what I'm capable ...
- 2019-02-13T11:38:16-07:00
- Forum: Users
- Topic: Dynamic removal of black background
- Replies: 14
- Views: 14945
Re: Dynamic removal of black background
I'm using the ImageMagick-7.0.8-27-Q16-x64-dll, downloaded from the homepage of ImageMagick, on a Windows 7 Pro 64-bits. The date of the version, according to the log files, is 2019-01-27. The white stripe I mentioned is actualy in the original image, verticaly, on the right. I just assumed it would ...
- 2019-02-12T07:22:02-07:00
- Forum: Users
- Topic: Dynamic removal of black background
- Replies: 14
- Views: 14945
Re: Dynamic removal of black background
I managed to find a blank page that ilustrates the problem more clearly, so it should be better for testing. As you'll be able top see, there is even a white line on the right side that makes it even more dificult (caused likely due to a bad scanning). Some images even have their bottom parts with ...
- 2019-02-11T09:44:33-07:00
- Forum: Users
- Topic: Dynamic removal of black background
- Replies: 14
- Views: 14945
Re: Dynamic removal of black background
Hey fmw42! It worked like a charm...for the most part. One of the films cotains really noisy backgrounds, like so: https://drive.google.com/open?id=1lS4pMR-FTEtToawMuiZI2f5k89SgxWRf So the command lines written basically do nothing, I assume due to these numerous white dots and random white lines in ...
- 2019-02-08T08:02:56-07:00
- Forum: Users
- Topic: Dynamic removal of black background
- Replies: 14
- Views: 14945
Re: Dynamic removal of black background
fmw42, that was PERFECT! Thank you! But I still need to remove the white background, as to reduce the image resolution...the final image would have it's 0x0 pixel coordinates as the start of the paper, and resolution would be the coordinates at the end of the paper, or a crop rectangle that would ...
- 2019-02-07T06:49:36-07:00
- Forum: Users
- Topic: Dynamic removal of black background
- Replies: 14
- Views: 14945
Re: Dynamic removal of black background
Hello fmw42! Thanks for the patience! The version I'm running is the ImageMagick-7.0.8-Q16, date of the version seems to be 2019-01-27, according to last log change, and platform is Windows 7 64-bits. I tried running the lines, and studied the links provided, along with some extras. But the images I ...