Friday, May 20, 2011

Linux USB Printer/Scanner Hacks.

I develop scanner/printer firmware. I develop under Linux.

Here are a few handy things I use to make my life easier.

Disable the Ubuntu “New Printer” dialog.
From Jeremy Ward, a coworker.

“One issue I was having was the printer driver install prompts displayed when plugging the dev board in/loading code on the dev board. I remember you mentioning that you had the same problem on Ubuntu. I was able to fix this issue by modifying the rules in /lib/udev/rules.d/70-printers.rules. I commented out all of the rules since that is what tells the system to launch the prompts. I don’t think there are any negative consequences from doing so.”

Allow user read/write to /dev/usb/lp*.
Add yourself to the ‘lp’ group with usermod. See usermod(8) man page.

Fedora : run system-config-users script (tested on FC14)
Ubuntu 11.04 : (from Desktop) System -> Administration -> Users and Groups

Allow user to scan without using root.
Either of the following methods should work. The following examples assume a USB VID of 0×8086 and USB PID of 0×1234.

From Eric Huang, a coworker.

- Add a new file called /etc/udev/rules.d/mrvl-printer.rules
- Add a line to the new file:
ATTRS{idVendor}==”8086” MODE:=”0666”

From David Poole.

- Edit /etc/udev/rules.d/40-libsane.d
- Add the following before the first ATTRS{idVendor}:
ATTRS{idVendor}==”8086″, ATTRS{idProduct}==”1234″, ENV{libsane_matched}=”yes”

I've also found being logged in to the console (the PC itself) allows me to scan on Fedora. There is some magic going on in udev where, if the user is on the console, access to the USB devices is allowed.

Tuesday, March 15, 2011

Installing 32-bit Support to 64-bit Fedora 14

I'm moving to a new Linux build box. My original Linux box is a 32-bit Fedora FC14. My new Linux box is a 64-bit Fedora FC14.

Our compiler toolchain is a 32-bit app. The compiler didn't run on the new box, giving a cryptic error about /ld/ld-linux.so.2

Dug around Google. There are two postfixes (?) on FC14 packages: .i686 and .x86_64 (FC13 used .i586).

Short story: as root,
rpm -i bzip2-libs.i686

The dependency pulled in the 32-bit glibc. Probably could have installed just glibc.i686

The two glibc versions are installable side-by-side.

Tuesday, March 1, 2011

Products I've Worked on.

HP LaserJet m1005. First scanner/copier.
HP LaserJet m1120. First network scan.
HP LaserJet m1319. First ADF, stepper motor.
HP LaserJet m1130. Low memory. Digital sensor.
HP LaserJet m1212nf. First combo ADF,flatbed. Digital sensor.

Sunday, January 30, 2011

Document Recognition and Retrieval. Electronic Imaging Conference. 27-Jan-2011

"Example centric document design and development"

Wilcoxon-Mann-Whitney statistic
http://en.wikipedia.org/wiki/Mann%E2%80%93Whitney_U

Spearman Correlation Coefficient
http://en.wikipedia.org/wiki/Spearman%27s_rank_correlation_coefficient

Blueprint - Adobe Labs

Perceptron
http://en.wikipedia.org/wiki/Perceptron



"Feature relevance analysis for writer identification"

Freeman chain codes
http://en.wikipedia.org/wiki/Chain_code

Grapheme
http://en.wikipedia.org/wiki/Grapheme

Chi-squared
http://en.wikipedia.org/wiki/Chi-square_test



"Using perturbed handwriting to support writer identification in the presence of data constraints"

MGH - Model Generated Handwriting

MPG - Model Perturbed Handwriting

"Text-Independent Writer Identification and Verification on Offline Arabic Handwriting"
Bulacu, Schomaker, Brink 2007

SVM (Support Vector Machine) with radius basis kernel

McNemar's Test
http://en.wikipedia.org/wiki/McNemar%27s_test



"Statistical characterization of handwriting characteristics using automated tools"

Probabalistic Graphical Model
http://en.wikipedia.org/wiki/Graphical_model

Document Recognition and Retrieval. Electronic Imaging Conference. 26-Jan-2011

Capture: Image to Archive (conference)

Scene Analysis "Functional Role Labeling"

Image Template -> template management

Trainable pattern classifiers. Features + Classifiers.
Features
--------
Haar
runlength
Fourier
word counts

Classifiers
-----------
Decision tree
nearest neighbor
SVM (Support Vector Machine)
generative probability
density

"Learning Image Anchor Templates for Document Classification and Data Extraction"
Sarkar. http://www.icpr2010.org/pdfs/icpr2010_ThAT7.5.pdf

Constellation Model
http://en.wikipedia.org/wiki/Constellation_model

Information extraction by finding repeated structure
Evgeniy Bart, Prateek Sarkar
http://dx.doi.org/10.1145/1815330.1815353

Best First Leaf Search (from aforementioned paper)

NIST tax form data sets
http://www.nist.gov/srd/nistsd2.cfm



"Introduction of Statistical Information in a Syntactic Analyzer for Document Image Recognition"

Sayre's Paradox
http://dx.doi.org/10.1016/0031-3203(73)90044-7

Hidden Markov Model
http://en.wikipedia.org/wiki/Hidden_Markov_model



"MRF Model w/ Parameter Optimization by CRF for online recognition of handwritten Japanese characters"

MRF - Markov Random Field
http://en.wikipedia.org/wiki/Markov_random_field

CRF - Conditional Random Field
http://en.wikipedia.org/wiki/Conditional_random_field

Extract feature points using Ramner method
U. Ramer “An Iterative Procedure for the Polygonal Approximation of Plan Closed Curves” Computer Graphics and Image Processing, vol.1, pp244-256, 1972.
http://dx.doi.org/10.1016/S0146-664X(72)80017-0

Stochastic Gradient Descent
http://en.wikipedia.org/wiki/Stochastic_gradient_descent

Viterbi algorithm
http://en.wikipedia.org/wiki/Viterbi_algorithm

Baum-Welch algorithm
http://en.wikipedia.org/wiki/Baum%E2%80%93Welch_algorithm

Elastic matching
http://en.wikipedia.org/wiki/Elastic_Matching



"Improving an HMM based offline handwriting recognition system using MME-PSO optimization"

MME -

PSO - Particle Swarm Optimization
http://en.wikipedia.org/wiki/Particle_swarm_optimization

MD-LSTM
http://en.wikipedia.org/wiki/Long_short_term_memory

HTK - toolkit for building HMMs (Cambridge)
http://htk.eng.cam.ac.uk/



"Segmenting text from outdoor images taken by mobile phones using color features"

Preprocessing:
RGB -> HSI
histogram equalization Intensity channel
HSI -> RGB

Image binarization

Noise removal

Image Segmentation.
http://people.cs.uchicago.edu/~pff/

"Font and Background Color Independent Text Binarization"
Kasar edge cue based algorithm
http://www.imlab.jp/cbdar2007/proceedings/papers/O1-1.pdf

Levenshtein Distance
http://en.wikipedia.org/wiki/Levenshtein_distance

Bag of Words
http://en.wikipedia.org/wiki/Bag_of_words_model_in_computer_vision

Local Adaptive Binarization



"Perceptive Method for Handwritten Text Segmentation"

Kalman Filtering
http://en.wikipedia.org/wiki/Kalman_filter

Delaunay graph for distance computation
http://en.wikipedia.org/wiki/Delaunay_triangulation

DMOSp



"A masked based enhancement method for historical documents"

Filtering (noise reduction)
- Wiener
http://en.wikipedia.org/wiki/Wiener_filter
- Median
http://en.wikipedia.org/wiki/Median_filter

Markov Random Fields
http://en.wikipedia.org/wiki/Markov_random_field

Local Binarization [Gatos 2006]
"Adaptive degraded document image binarization"
http://dx.doi.org/10.1016/j.patcog.2005.09.010

OCR - Tesseract
http://en.wikipedia.org/wiki/Tesseract_%28software%29

Electronic Imaging Conference. 26-Jan-2011

Keynote: "Problems in Biological Imaging: Opportunities for Signal Processing"

PSF - Point Spread Function
http://en.wikipedia.org/wiki/Point_spread_function

Restoration: Denoise, Deconvolution.

http://en.wikipedia.org/wiki/Deconvolution

Hysteresis
http://en.wikipedia.org/wiki/Hysteresis

Segmentation
- thresholding
http://en.wikipedia.org/wiki/Thresholding_%28image_processing%29

- watershed
http://en.wikipedia.org/wiki/Watershed_%28image_processing%29

Electronic Imaging Conference. 25-Jan-2011

Keynote. "New Dimensions in Image Quality"

Full Reference (have pristine original)

"Blind" - no reference

MSE - Mean Squared Error

Spearman Correlation
http://en.wikipedia.org/wiki/Spearman_correlation

Hysterisis
http://en.wikipedia.org/wiki/Hysteresis

LIVE VQA
http://live.ece.utexas.edu/research/quality/live_video.html

- Natural Images obey statistical laws
- Our brain adapted to these statistics over eons

Natural Scene Statistics
- gaussian scale mixture (GSM)
http://en.wikipedia.org/wiki/Location_testing_for_Gaussian_scale_mixture_distributions
- generalized gaussian distribution (GGD)
http://en.wikipedia.org/wiki/Generalized_normal_distribution

Augmented Reality.

ISO 3664. Viewing Conditions.
http://www.iso.org/iso/catalogue_detail?csnumber=43234

ISO 13655. Metrology.
http://www.iso.org/iso/catalogue_detail.htm?csnumber=22476

USB2000 UV-VIS Spectronomer
http://www.oceanoptics.com/Products/usb2000+.asp

www.create.uwe.ac.uk
Color Research European Advanced Technology Employment (CREATE)

"Human Vision Based Color Edge Detection"
Delta-E-CAM-VCS > Delta-E-00 > Delta-E-CMC

"Object Classification by Color Normalization or Calibration?"
Gray World. Buchsbaum 1980. (Color constancy algorithm)

Finlayson 1998. http://www.springerlink.com/content/nhcjvku49b4jnn5r/

Retinex
http://en.wikipedia.org/wiki/Color_constancy

Colorimetric Calibration, [lee88]
maybe http://onlinelibrary.wiley.com/doi/10.1002/col.5080130311/abstract

KOPID data set uni-koblenz.de/kopid

Histogram comparison:
- sum of squares difference (SSD)
- histogram intersection
- simplified chi-squared

Earth-Mover's Distance
http://en.wikipedia.org/wiki/Earth_mover%27s_distance

"Evaluating the Smoothness of Color Transforms"

Thor Olson: Smooth Ramps: Walking the Straight and Narrow Path through Color Space. Color Imaging Conference 1999: 57-64

journalofvision.org