Print question for software engineers

Discussion in 'Digital Photography' started by Keith Sheppard, Jan 3, 2006.

  1. Does anyone have any useful references for photographic image printing
    algorithms? A printed image is typically at a higher resolution than the
    digital image data. For example, a 1600x1200 image will seldom require
    magnification for screen display purposes, but the same image would only
    measure 5.3x4" if printed at 300ppi without any magnification.

    I have achieved good results enlarging images for display by extrapolating
    intermediate pixels from the surrounding colours. Applying the same
    technique to a printed image, though, produces a print which looks fuzzy and
    out of focus.

    Any suggestions for simple but effective print enlargement algorithms
    gratefully received.


    Keith Sheppard, Jan 3, 2006
    1. Advertisements

  2. Keith Sheppard

    rafe b Guest

    If you plan to print images, then you should
    capture or scan them with appropriate resolution.
    Upsampling from "screen" resolution to
    "print" resolution is not the way to do it.

    Look up: dithering, half-toning, error diffusion,

    You can be there's lots of research on this.

    You might also go find and peruse the code
    in Gimp-Print.

    rafe b
    rafe b, Jan 3, 2006
    1. Advertisements

  3. If you plan to print images, then you shouldThat's not always an option. I am talking about digital photos taken on a
    low mp camera. All I do know is that the software provided with the camera
    does a better job of upsizing than my own. It's just a pity that the
    provided software's user interface is a pile of pants and doesn't provide me
    with the flexibility I need.

    And before anyone points out that I can use xyz software instead, let me
    just point out that isn't the point of the exercise. Fans of the Times
    Crossword could save themselves a lot of effort by waiting 24 hours then
    filling in the answers from the next day's paper. I want to get my own
    software to do this for the intellectual challenge and satisfaction of
    achievement, not just because I'm too pikey to buy anything else. OK, I am
    too pikey but that's another matter.

    Keith Sheppard, Jan 3, 2006
  4. Keith Sheppard

    Martin Brown Guest

    There are no simple but effective interpolation schemes for colour images.

    There are complex effective non-linear interpolations schemes, that
    recognise certain high contrast structures some of them are documented
    in various patents and/or image processing journals.

    And there are simple but ineffective bi-linear and bi-cubic
    interpolation methods that if combined with a bit of unsharp masking
    might be good enough. However, you are probably better off buying
    something that has been optimised to do what is a specialist task.

    Martin Brown
    Martin Brown, Jan 3, 2006
  5. Keith Sheppard

    rafe b Guest

    There are numerous upsampling algorithms known
    in the business. If you think you can advance the
    state of the art here, go for it.

    You simply can't invent detail out of thin air.
    To some extent, your quest is Alchemy.

    For my $50 (or so) there's Qimage, or for that
    matter, Photoshop's Bicubic.

    rafe b
    rafe b, Jan 3, 2006
  6. Keith Sheppard

    Paul Allen Guest

    Do you know of any that have been published and are not patented?
    I'm sure Keith can figure out how to work a library if he knows
    what he's looking for.
    I think you missed Keith's point. He's in it for the journey more than
    for the destination. He wants to understand and implement an effective
    interpolation algorithm, not just buy one. Unfortunately, I think
    the probability of finding an algorithm that he can legally implement
    is low. The essential wrong-headedness of patenting software is not
    photography-related, and will be left for another discussion.

    Paul Allen
    Paul Allen, Jan 3, 2006
  7. SNIP
    Highly recommended, see: <>
    there's even a lite version available ...

    Bart van der Wolf, Jan 4, 2006
  8. There are numerous upsampling algorithms known
    I understand completely what you say. I am not looking to better whatever
    is state of the art - perhaps not even to match it, but to get close would
    be nice.

    I was gratified to note that in my current algorithm I seem to have
    independently invented bicubic (although I was using a 3x3 rather than 4x4
    grid). I am beginning to realise that any advance over that will require
    some sort of shape recognition code to avoid fuzzing sharp borders. I was
    wondering what I was going to do in 2006 ;)

    Keith Sheppard, Jan 4, 2006
  9. He's in it for the journey more than for the destination.

    Nicely put.

    Of course, if I read such a patent and understood it enough to write
    something similar for my own use only, who would know?

    Keith Sheppard, Jan 4, 2006
  10. I don't think there's anything to prevent you from replicating the work
    in any patents you want as long as it is for your own private
    experimental use. After all, the point of the patent system is supposed
    to be to disseminate knowledge. You just can't sell (or give away)
    something that is covered by someone else's patent without their

    Dave Martindale, Jan 4, 2006
  11. Bicubic resampling uses a 4x4 grid because it takes 4 input points to
    fully define the 4 free variables in a cubic polynomial. If you're
    using a cubic based on only 3 points, how do you calculate the 4

    Normally, 3 points would define a quadratic, and you can do biquadratic
    interpolation. But people don't usually do this, because odd-degree
    polynomials have some advantages, so they usually skip directly from
    linear to cubic if they're trying to improve results (5th and 7th degree
    are also possible).

    I am beginning to realise that any advance over that will require
    Now you're into nonlinear image processing. (Nonlinear in the sense
    that the sum of two resampled images may not be the same as the
    resampled sum of the two images - the operation is no longer a linear

    Dave Martindale, Jan 4, 2006
  12. Keith Sheppard

    Paul Allen Guest

    I am reminded of an exaggerated explanation of the difference between
    sailors and power boaters:

    The sailor raises his sail in order to feel the boat surge as he
    holds sail, wind, hull, and water in balance to the best of his
    ability. He may get someplace at some time in the future, but that
    depends entirely on his skill and deep understanding of what he is
    doing. The destination may be important, especially when tide,
    gathering darkness, and a rising gale are against him, but the intimate
    connection with the process of getting there remains central.

    While the power boater may find joy in travelling over the water,
    he has little connection with how well the boat moves through the water
    or how efficiently his engine transfers power to the prop. The noise
    of the engine and the pounding of the hull are endured because they
    result in transporting boat and pilot to a destination. And if he
    wants to get places faster or in greater comfort he just buys a better

    There's nothing particularly wrong with either the sailor's or the
    power boater's approach. Let's just say I recognise you as a fellow
    sailor, so to speak.
    Dang! Why didn't I think of that? :)

    Paul Allen
    Paul Allen, Jan 4, 2006
  13. Bicubic resampling uses a 4x4 grid because it takes 4 input points toMaybe I misunderstood bicubic. The explanation I was working from was a
    little dumbed down.

    Keith Sheppard, Jan 5, 2006
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.