Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Bilinear interpolation

Bilinear interpolation

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorial
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Arrun
    wrote on last edited by
    #1

    How to get the same intensity after stretching an image eg: Let intensity of a square of 1 unit = 1 x I1 If I stretch the square to 2 units then the intensity = 2 x I2 Both these intensities should be equal 1xI1 = 2xI2 = k(constant) I am using bilinear interpolation for stretching but the intensities arent equal. Is there some other method for stretching so that I ll get same intensity in both the images. Pls Help

    A 1 Reply Last reply
    0
    • A Arrun

      How to get the same intensity after stretching an image eg: Let intensity of a square of 1 unit = 1 x I1 If I stretch the square to 2 units then the intensity = 2 x I2 Both these intensities should be equal 1xI1 = 2xI2 = k(constant) I am using bilinear interpolation for stretching but the intensities arent equal. Is there some other method for stretching so that I ll get same intensity in both the images. Pls Help

      A Offline
      A Offline
      Anonymous
      wrote on last edited by
      #2

      Well I guess you can solve the problem just by dividing Intensity in each pixel by a stretch factor. In above example- just divide it by 2. But I think your problem could be deeper- if you imagine an image, and you zoom in (for example you double the number of pixels in both directions -> you see 4 times more pixels), it means that you are watching sub-pixels, and they have area of 1/4 of original pixel. Therefore you have 4 times more pixels, but each of them has just 1/4 of unit area.

      A 1 Reply Last reply
      0
      • A Anonymous

        Well I guess you can solve the problem just by dividing Intensity in each pixel by a stretch factor. In above example- just divide it by 2. But I think your problem could be deeper- if you imagine an image, and you zoom in (for example you double the number of pixels in both directions -> you see 4 times more pixels), it means that you are watching sub-pixels, and they have area of 1/4 of original pixel. Therefore you have 4 times more pixels, but each of them has just 1/4 of unit area.

        A Offline
        A Offline
        Arrun
        wrote on last edited by
        #3

        Thanks a lot Is there any algorithm or filter which I could use to reduce the intensity? It should work both ways (stretching and shrinking).

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups