Closed Thread Icon

Topic awaiting preservation: Image Sampling & Processing (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=7109" title="Pages that link to Topic awaiting preservation: Image Sampling &amp;amp; Processing (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Image Sampling &amp; Processing <span class="small">(Page 1 of 1)</span>\

 
Dracusis
Maniac (V) Inmate

From: Brisbane, Australia
Insane since: Apr 2001

posted posted 10-27-2003 15:53

I didn't know where to post this as it doesn't relate to any particular software package or programming language that we have a forum for, anyways...

Anyone have any links to resources on image sampling/processing/filtering?

I'm looking for stuff about bilinear/bicubic/gaussian sampling (and possibly a bit of sharpening too) as I need to write a bunch of image processing scripts for high quality deformations of small images (roughly 60x30 pixels). They're image tiles for a web game I'm working on and if I can process high quality scaling, rotations and quad deforms with client side code, it'll save a huge chunk of bandwidth as opposed to pre-processing all the images to store on the server. This doesn't need to be fast, like I said, it'll be used to pre-render image tiles to store in memory, so I'm not aiming for any kind of real time animation effects with this, but the image processing capabilties of the environment I'm working with are near non-existant asside from some direct pixel get/set and non-interperlated quad deform functions. -- But I'm thinking this is enough to write my own filters with.

Anything that will explain this kinda stuff to me like I'm a 3 year old would be super handy, but not necessary -- I'm just having one of those days/weeks where you constantly feel really dumb and just can't think straight.

bodhi23
Paranoid (IV) Inmate

From: Greensboro, NC USA
Insane since: Jun 2002

posted posted 10-27-2003 22:51

I have those days myself...

Just a quick poke around google pulled up the following links:

http://www.cs.princeton.edu/courses/archive/fall00/cs426/lectures/sampling/
http://www.ph.tn.tudelft.nl/Courses/FIP/noframes/fip--4.html
http://www.eecs.harvard.edu/graphics/chapters/samp.pdf
http://www.mli.gmu.edu/projects/mlt.html

None of them looked like a 3 year old would understand them, but there could be some handy information contained herein...

Good luck!


Cell 617

Dracusis
Maniac (V) Inmate

From: Brisbane, Australia
Insane since: Apr 2001

posted posted 10-27-2003 23:27

Thanks for that bodhi, but I've already read through most of those and they didn't really help much. I usually only come here asking questions when google fails me.

I think my problem in finding relevant information is that I'm not using the correct terms to search with, because I know what I want, but I don't really know what it's called. Most of the stuff I've turned up so far seems to be rather abstract and more concerned with hardware related stuff than how to program image filters etc... but searching for anything with the word "filter" usually turns up endless ammounts of rubbish about ps plugins, and if I search with "-plugin", I get hardware related stuff again.



poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 10-28-2003 01:08

Dracusis: When you search some programming techniques you should have more luck by using the term algo or algorithms, look in some (news)groups first and try to pick some more accurate terms from your first results. comp.graphics, comp.graphics.algorithms and comp.graphics.misc. Using some 'appropriate' keywords in those groups return the following results.

Whatever. Bilinear and Bicubic interpolations are rather explicits. The bi preffix means that the filters are applied in 2 dimensions ( X and Y ), then the linear and cubic suffix respectively mean that the datas are weighed according to a linear or cubic interpolation. Let's have an example:<BLOCKQUOTE><FONT face="Verdana, Arial">code:</font><HR><pre>imagine you have a grid of datas ( it can be some colors values, some density potentials ... ) A, B, C and D and you wish to process the value in e

A&#9472;&#9472;&#9472;B

Dracusis
Maniac (V) Inmate

From: Brisbane, Australia
Insane since: Apr 2001

posted posted 10-28-2003 01:48

Yeah, this looks more like what I'm after.

Thanks for the clarification on the bi***** thing, makes perfect sense now I think about it. Thus trilinear filtering (common option 3D video cards for texture processing) would take three linear samples for interpolation. I wonder why PS doesn't offer more accurate sampling... eh, maybe it's not much of a benefit over bicubic or too slow to process in software or something.

Anyways, you've now got me wondering which methods of interpolation would be best for upsizing vs downsizing images, I'm sure I'll find lots of stuff on those news groups you linked to. Oh and I mentioned sharpen because I know that bicubic downsizing blurs the image a little which is often corrected in PS with a little sharpen and seeing as I'll be scaling tiny texture tiles I want the texture to remain as sharp as possible.

Although I'll likely have to turn this over for a while before I can fully understand it. When you mention the decimal part of e, you mean that the coordinate of e exists between the integer coordinates of A, B, C or D? So like A, B, C and D are pixels and e is the point in-between that I wish to interpolate?

Yet, I'm still kinda confused about the difference between linear and cubic here. What's the ^3 mean exactly? (Would now be a good time to tell you I absolutely suck at math? ? I?m guessing it means to the power of / cubed). If each only takes 2 samples, then why is bicubic regarded as a superior filtering method? (This would probably click if I knew what ^3 meant exactly, maybe).

*shrug*

Never mind. I'm sure I can figure things out.

It probably won't start to make complete sense until I play with it and can actually view the results first hand....

My god I crap on don't I. Ok, I'll shut up now. Thanks again poi, you've given me lots of nifty information to chew through. =)

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 10-28-2003 03:29

Dracusis: Glad I didn't wrote that thing for nothing.

I forgot to mention that kernels are often called: convolution kernels.

What I said about the bi prefix works for the tri one. Thus tri-linear filtering means that it works in 3D, thus instead of having only 4 values ( at the corner of square ) to weigh according to 2 parameters like it's the case in 2D, you now have 8 values ( at the corner of a cube ) according to 3 paramaters since you're now in a 3D space. To make short, the main advantage of trilinear filtering is that it blurs the textures according to their distance to the camera to avoid to have the same amount of details ( and then flickering pixels ) in close and distant objects.

You may find some usefull informations in the 5th lecture of the INFT140 - Multimedia Image Design - Bond University School of Information technology, and in the 1st part of an Image Interpolation and Filtering essay.

Yes, by decimal part of the coodinates of e, I effectively meant that e is the point in-between that you wish to interpolate.

^3 meant raised to the power of 3. Well, I'm almost sure my bicubic formula is wrong, but you've got the idea and if I give you all the answers it wouldn't be funny

Last, you should also have a look at Mathematical Morphology, and morphological operators. And as usual, when someone gives some url, be a little curious and look the parent pages

Cheers,
Mathieu "POÏ" HENRI

[This message has been edited by poi (edited 10-28-2003).]

Dracusis
Maniac (V) Inmate

From: Brisbane, Australia
Insane since: Apr 2001

posted posted 10-28-2003 04:13

Ay, convolution, I came across that a lot in some stuff I was reading earlier.

Thanks again for the additional links and resources, you've been a monumental help. If only I didn't have to write this damn phycology paper I could dive right into it. Heh, I'm writing a paper about cognitive science and attention whilst constantly being distracted with other stuff I'd much rather work on -- could it get any more ironic.

But yeah, it's starting to fall into place the more I let things turn over upstairs so to speak. I can't wait to get stuck into it and actually start putting some of this stuff into practice. Looks hell fun. =)

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 10-28-2003 11:12

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

« BackwardsOnwards »

Show Forum Drop Down Menu