HOWTO: Install Irfanview - Ver 4.27 in Fedora 14
This HOWTO: will guide you through the process of installing Irfanview version 4.27 in Fedora 14.
PREWORK:
Before staring the install of Irfanview, there are a few things that need to be
downloaded. These need to be installed in the order shown below.
installed.
DOWNLOAD or Install:
1. Install - Wine (Ver 1.3.8) (With SYSTEM -> ADMINISTRATION -> ADD/REMOVE Software)
2. Download - winetricks (MFC42.DLL is required) (Google Search for winetricks)
3. Download - cabextract
4. Download - iview427_setup.exe (Google Search for Irfanview)
5. Download - setup_kadmos_irfanview_us.exe
6. Download - irfanview_plugins_427_setup.exe (Optional)
7. Install unpaper Version .3
Open a Terminal Window (Console) and Install: (Cut & Paste to prevent errors)
Code:
sudo yum install cabextract
This will allow the extraction of the CAB Files as needed.
Left Click on APPLICATIONS -> WINE -> WINE CONFIGURATION
This will create the configuration file. You can close the Configuration Window.
Change to the subdirectory where you saved the winetricks and other downloaded files.
Install the MFC42.DLL and others if needed........
Code:
cd ~/Downloads/Irfanview
sh winetricks
Now install Irfanview & Kadmos, after copying iview427.exe & setup_kadmos_irfanview_us.exe
to .wine/drive_c. During the install, Create the Desktop Icon ONLY. The others won't work properly.
Code:
cd ~
cd .wine
cd drive_c
ls
wine iview427.exe
wine setup_kadmos_irfanview_us.exe
Click on the Desktop Icon to run Irfanview.
If you wish to grab your camera and take some Pictures of that old CookBook, and convert those Pictures to a TXT file there are
two Methods shown here. Just make sure that your Camera is set for MACRO MODE and have enough lighting to get a descent picture.
It may take a few trial runs to get a good output TXT file.
METHOD #1 - USE IRFANVIEW & KADMOS:
Open the JPG's or BMP's of any image you wish to OCR. Use FILE -> BATCH CONVERT to convert the image/images to TIF, and under
ADVANCED set the Conversion to 1Bit Black, and NO Dithering. Save all Images as TIF. (This will allow OCR conversion by Kadmos).
Open the TIF Image and use OPTIONS -> START OCR to Convert to Text. Use your Mouse to grab the Top Left and Bottom Right corners
of the Left CookBook Page and convert it. Save the File. Repeat for Right CookBook Page. You can't EDIT this text File and save it now.
You must do that later...... after you exit the OCR Plugin.
METHOD #2 - Use TESSERACT OCR: (Don't paste the #--remove blah blah text when using the commands.)
1. Take Pictures of the Cookbook in MACRO MODE. (Or Scan the Cookbook to BMP's)
These JPG's or BMP's will have two CookBook pages on each image.
2. Convert the JPG's/BMP's to PBM's to allow making separate pages with unpaper.
Under ADVANCED select 1 Bit Black, NO Dithering, and NO Compression
convert P102004043.jpg image001.pbm #-- or use Irfanview's Batch Convert for this, which is really easy.....
3. Use unpaper to make two pages of each PBM file.
unpaper --layout double --overwrite --deskew-scan-range 10 --output-pages 2 image%03d.pbm out%03d.pbm
rm image*.pbm #-- remove un-necessary files
4. Convert the PBM to a TIF for Tesseract OCR.
convert out001.pbm out001.tif # -- for one file
for i in `ls out*.pbm`; do convert $i ${i%.pbm}.tif ; done # -- for multiple files
rm out*.pbm #-- remove un-necessary files
5. Use Tesseract OCR to create the text file.
tesseract out001.tif out001 #-- for one file
for i in `ls out*`; do tesseract $i ${i%.tif} ; done #-- for multiple files OR use the next one
for i in $(ls out*.tif) ; do tesseract $i ${i%.tif} ; done # -- for multiple files.
rm out*.tif #-- remove un-necessary files
6. Create the Cookbook from all the converted pages.
cat out*.txt > CookBook.txt
rm out*.txt #-- remove un-necessary files
7. Edit the CookBook Text file to correct the mistakes.
My testing has shown that Kadmos does a better job than Tesseract OCR, but Tesseract works so much faster.
It still leaves a lot of correcting......But it's not too bad.........
REF: http://forums.fedoraforum.org/showthread.php?t=255875
ENJOY! Another Christmas Idea.........Grab those CookBooks from the Relatives and start taking pictures.......
lkraemer