block some part of an image for image process

  • Hi Friends,

    I am a APPLET beginner and have to learn a lot. Thanks for help in advance.

    One question: how to block some part of an image for image process?

    I want to do the real time image process for the captured video. However, only is the central part useful image and surrounding area is useless. How can I filter out the surrounding area?

    Solution is appreciated.



  • Dear Baoxi,

    You can use the build-in ImageBuffer Width/Height + X/Y Offset to apply a region of interest to the image.
    There are more operators that can do a region of interest, like: DynamicROI or ImageBufferMultiROI(dyn) ...

    If the region of interest is not rectangular, please let us know.

    Best regards,

    Björn Rudde
    Field Application Engineer
    - Basler AG

  • Dear Baoxi,

    thank you for your answer. As the region of interest is a circle I have some additional questions:

    1. Do you know the coordinates x and y, where there is useful or useless information without further image processing?

    2. Is it suitable for you to do a filtering by setting the useless pixel to zero value?

    If yes, you can think of a processing like sketched in the following:


    With this processing you can set all pixels outside a specified region to a zero value. You also can combine this processing with a previous selection of a rectangular region of interest for example using operators SelectROI, DynamicROI,....

  • Dear CarmenZ,

    1. Yes, I know the coordinates x and y.

    2. Yes, setting the useless pixel to zero value is expected.

    Thank you very much for the suggested processing. I will try it.


    Thanks again and best regards,


  • Dear CarmenZ,

    I have tried the design. It selects a rectangular region successfully. But how to select a circular region?

    Your instruction is appreciated.

    Thanks and Best regards,


  • Dear Baoxi,

    please find attached a ViausalApplets design example, for the definition of a round central region. The idea of the design is to go in a coordinate system reletive to the image center, and calculate the distance of the current position relative to the center of the image. Then we can set all pixels outside a specific radius to value zero.