Interpolate Image for matching Image sizes

  • Hi,

    I have a custom made camera with two different chips. Both chips of the camera display the same object area in a different wavelength range. The first chip has a pixel pitch of 15 µm and the second chip has a pixel pitch of 17.6 µm. I have to superimpose the images of the two chips in order to perfom calcuations. Therefore the pixel number of the two images must be adjusted. This means that the image of the second chip has to be upscaled to a pixel number (in x and y direction) by the factor 1.17333 to match the image of the first chip.

    Is there a present hirarchical box or operator for this case which performs such an interpolation / upsampling?


    Many thanks in advance and kind regards

    Janek

  • Hi Janek


    In example Scaling a Line Scan Image you can find a design using scaling in x-direction using a lookup table. The difficulty of the implementation is the x-direction as we have to conquer some difficulties at higher parallelisms. In Y-direction it is more simple as you can do this as a predecessor of the x-scaling.

    To be honest the example is not the easiest to understand as it is strongly optimized for a higher parallelism.


    I don't recommend to use the examples Geometric Transformation and Distortion Correction. They will solve your problem but are implemented for more complex transformations. Your implementation should use BRAM instead of DRAM


    Let us know your input parallelism (bandwidth requirement) and maximum resolution of the image which has to be scaled. Mybe we can find another example as we have done plenty of these implementations.


    Johannes


    Johannes Trein
    Group Leader R&D
    frame grabber

    Basler AG



  • Hi,

    thank you very much for the quick answer!

    Unfortunately I could not adapt the example to my application.

    I would like to upscale an image of 259 x 218 pixels (12 bit, Parallelism 1) to a resolution of 304 x 256. Could you possibly send me another example.

    Many thanks and kind regards

    Janek Stahl

  • Dear Janek,

    thank you for your request.

    You can use the Visual Applets example "GeometricTransformation_FrameBufferRandomRead.va" for upscaling the image in both image directions by a factor of 1.17. This example is DRAm based,but maybe can solve your problem:

    Right-Mouse-click on the module "GeometricTransformation" and set under properties following parameters:


    pasted-from-clipboard.png