Thread Subject: data compression

Subject: data compression

From: ahmed

Date: 15 May, 2008 06:25:04

Message: 1 of 6

I have a large database that containing images. Every
image is described with a matrix (X) which has two vectors
one vector is the horizontal projection and the other
vector is vertical projection of the image. These vectors
have the same length (d). For example let d=512, this
means that the size of (X) = 512x2. All the values are
positive floating point numbers.
My problem is how I can simplify the matrix X in a new
vector (Y) that also represents the image but with a
little information?
Can any one give me an idea?
My idea is to make a code that represents the two vectors
in the matrix and also to distinguish images from each
other

Subject: data compression

From: Dave Robinson

Date: 15 May, 2008 10:29:02

Message: 2 of 6

"Ahmed " <mogwari2000@yahoo.com> wrote in message <g0gl00
$nhs$1@fred.mathworks.com>...
> I have a large database that containing images. Every
> image is described with a matrix (X) which has two
vectors
> one vector is the horizontal projection and the other
> vector is vertical projection of the image. These vectors
> have the same length (d). For example let d=512, this
> means that the size of (X) = 512x2. All the values are
> positive floating point numbers.
> My problem is how I can simplify the matrix X in a new
> vector (Y) that also represents the image but with a
> little information?
> Can any one give me an idea?
> My idea is to make a code that represents the two vectors
> in the matrix and also to distinguish images from each
> other
>
My original question still stands, do you need absolute or
approximate compression?

Check Wavelet compression, excellent demo in the Wavelet
toolbox.

Regards

Dave Robinson

Subject: data compression

From: ahmed

Date: 16 May, 2008 05:13:01

Message: 3 of 6

let me tell you my idea in more detail:

1. I have a big database of signature images; to make
an effective search in this database I solve to
partitioned/clustered it into several bins.
2. To make these partitions I well use k-means
clustering algorithm
3. When a new signature come it well be assigned to
one of the bins and all of the signatures within this bin
can be compared with the new one for final identification.
4. So that I need to represent every signature image
in the database with a code that well be a point in the k-
mean algorithm.
5. The code I well not use to decide weather the
signature is genuine or forgery.
6. I need to make this code from the projections.

Subject: data compression

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 16 May, 2008 20:17:24

Message: 4 of 6

In article <g0gl00$nhs$1@fred.mathworks.com>,
Ahmed <mogwari2000@yahoo.com> wrote:
>I have a large database that containing images. Every
>image is described with a matrix (X) which has two vectors
>one vector is the horizontal projection and the other
>vector is vertical projection of the image. These vectors
>have the same length (d). For example let d=512, this
>means that the size of (X) = 512x2.

I am confused by your reference to "horizontal" and "vertical"
"projection". Your wording could mean that the images can be
reconstructed perfectly by that dx2 vector, such as would be the
case if the "image" was a simple X/Y plot and the two vectors
were the X and Y coordinates.

Looking at your later posting about signatures and so on, I am now
wondering if the "projections" are some kind of signal analysis
of the image, with the analysis applied once horizontally and
once vertically, and the two vectors then contain the coefficients
appropriate for each direction? Or do you mean "horizontal projection"
in the linear algebra sense, sort of the "shadow" that would be
cast by the image if you pretended it was solid and shone a light on it?
--
  "All human knowledge takes the form of interpretation."
                                              -- Walter Benjamin

Subject: data compression

From: ahmed

Date: 16 May, 2008 21:11:02

Message: 5 of 6

1. i compute radon transform of the signature image for
angles 0 (horizontal projection) and 90 (vertical
projection).
it is deffinitly that the signature images can't be
reconstructed from these two projections (it seems you
like to tell me that these two projections not enough to
classify signatures).

2. projections here means horizontal and vertical
projections.

Subject: data compression

From: Dave Robinson

Date: 17 May, 2008 14:56:02

Message: 6 of 6

"Ahmed " <mogwari2000@yahoo.com> wrote in message
<g0kt96$hog$1@fred.mathworks.com>...
> 1. i compute radon transform of the signature image for
> angles 0 (horizontal projection) and 90 (vertical
> projection).
> it is deffinitly that the signature images can't be
> reconstructed from these two projections (it seems you
> like to tell me that these two projections not enough to
> classify signatures).
>
> 2. projections here means horizontal and vertical
> projections.

I am surprised that you go to the extent of doing a Radon
Transform, I would have thought a simple use of the Matlab
function 'sum(A,Dim)' (see doc sum) would do what you
require - I don't know, it may just be possible that the
Radon transform is smart enough to check for this ,so you
may not get any speed advantage, but my guess is that you
will find it a lot faster.

As you cannot reconstruct your signatures from the
projections, it is clear you don't really need an absolute
compression. I would also think that as you are integrating
your signal across the rows/columns they would tend to be
relatively slow functions, e.g. it would be rare to get a
full scale transition occurring in 1 pixel (but I may be
wrong here ;-) So I would think that some scale space
compression techniques based upon Wavelets would perform
very effectively (after all it is the basis of JPEG 2000
compression). So to repeat my advice on a previous response,
either have a look at the demo provided in the Wavelet
toolbox, else have a Google for wavelet compression.

When comparing the Signature 'signature's' check out dynamic
programming techniques, which will allow you to compensate
for variations in length and evenness of the original writing.

Hope that helps

Dave Robinson

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Public Submission Policy

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.

Contact us at files@mathworks.com