Menu

Suggestion - pixel interpolation

Developers
Phodopus
2014-07-31
2014-08-01
  • Phodopus

    Phodopus - 2014-07-31

    Hi,
    In my project I have some functions, like perspective correction, image stretching and fisheye unwrapping. I've implemented bilinear and bicubic filter, but I'd like to give more choice for users :)
    I need to access resampling function at pixel level.
    Could it be possible to add a function for this?
    Something like

    DLL_API BOOL DLL_CALLCONV FreeImage_GetPixelResampled(FIBITMAP *dib, float x, float y, RGBQUAD * value, FREE_IMAGE_FILTER filter FI_DEFAULT(FILTER_CATMULLROM));

     

    Last edit: Phodopus 2014-08-01
  • Hervé Drolon

    Hervé Drolon - 2014-08-01

    Hi,

    What this function is supposed to do ?

    Hervé

     
  • Phodopus

    Phodopus - 2014-08-01

    Since x,y are float, it should return in *value interpolated rgb values for this coordinates, using specified filter. Something like here for bilinear interpolation:
    http://en.wikipedia.org/wiki/Bilinear_interpolation
    FreeImage has implemented several filters, so maybe they could be used this way.
    I have to look into source code od rescale function to see, if it can be done easily (maybe not) :)

    Andrzej

     

    Last edit: Phodopus 2014-08-01

Log in to post a comment.