A little Q?

Discuss digital image processing techniques and algorithms. We encourage its application to ImageMagick but you can discuss any software solutions here.
Post Reply
ali.biomed7
Posts: 5
Joined: 2015-10-20T15:55:43-07:00
Authentication code: 1151

A little Q?

Post by ali.biomed7 »

Hi,friends
I don't know how to use linear interpolation method on a matrix like this:
7 5 6
2 8 4
3 5 3
and the other is Interlacing zeros?
I would be grateful if sb help me,plz.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: A little Q?

Post by fmw42 »

Sorry, but I do not understand your requests. I am not familiar with "linear interpolation method on a matrix". What do you mean by that? What is it you want to do with the matrix -- use it for convolution?

Perhaps you want to compare two images. IM can give you a number of metrics for the difference between two images. See
http://www.imagemagick.org/script/compare.php
http://www.imagemagick.org/Usage/compare/
http://www.imagemagick.org/Usage/compare/#statistics

Or I have a script that will generate a scatter plot between two images, but it does not do the linear regression analysis. See
http://www.fmwconcepts.com/imagemagick/ ... /index.php

For general linear regression, you may need to go to something like MATLAB.

Also I have no idea what you mean by "interlacing zeros"? Do you want to add rows or columns of zeros between each row or column of an image?

Please read viewtopic.php?f=1&t=9620
ali.biomed7
Posts: 5
Joined: 2015-10-20T15:55:43-07:00
Authentication code: 1151

Re: A little Q?

Post by ali.biomed7 »

User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: A little Q?

Post by fmw42 »

ali.biomed7
Posts: 5
Joined: 2015-10-20T15:55:43-07:00
Authentication code: 1151

Re: A little Q?

Post by ali.biomed7 »

linear interpolation not bilinear or bicubic !!!
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: A little Q?

Post by snibgo »

The Google books link doesn't work for me.

Linear interpolation is for one dimensional spaces. Bilinear is for two dimensions. The principle is the same.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: A little Q?

Post by fmw42 »

This is an image forum for 2D processing. As user snibgo said, linear interpolation is for 1D and bilinear is for 2D. The latter is linear in both x and y.

If you really have a 1D situation, then you should post to some other forum.

If not, then please explain your problem in more detail.


If you are trying to fit a line to a set of points, then search Google. Here are some results:

http://hotmath.com/hotmath_help/topics/ ... t-fit.html
http://mathworld.wolfram.com/LeastSquaresFitting.html
http://stackoverflow.com/questions/1144 ... ine-with-c
http://www.johndcook.com/blog/2008/10/2 ... e-to-data/
ali.biomed7
Posts: 5
Joined: 2015-10-20T15:55:43-07:00
Authentication code: 1151

Re: A little Q?

Post by ali.biomed7 »

Let me ask my Q in another way.
Do u know this structure------> imsize(O,[3 3],'bilinear') ?

O=[1 1;2 2]

The answer from matlab is:
1.0000 1.0000 1.0000
1.5000 1.5000 1.5000
2.0000 2.0000 2.0000
Can u get the answer in paper without using matlab ,in paper by hand?
ali.biomed7
Posts: 5
Joined: 2015-10-20T15:55:43-07:00
Authentication code: 1151

Re: A little Q?

Post by ali.biomed7 »

The link is page 294 from DIGITAL IMAGE PROCESSING book By JAYARAMAN.
If u search linear interpolation or zero interlacing expression u will get the page i said.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: A little Q?

Post by snibgo »

Your question seems to be about Matlab, not ImageMagick.

I suggest you ask on a Matlab forum, or read the documentation.
snibgo's IM pages: im.snibgo.com
Post Reply