Industrial Cameras FAQ/The lower part of an image is ...

The lower part of an image is occasionally replaced to another frame image. Please show how to prevent this issue. (No.294)

In the following cases, lower part of an image may be replaced to another frame image.

* The source image is overwritten during processing, for example creating bitmap object, the source image.
* A window painting event handler that draws bitmap objects is interrupted by another window painting event handler.
* User application keeps using pointer of image buffer that Strm_LockBuffer() function provides after unlocking the buffer.
* User application keeps using pointer of image buffer that ImageAcquired callback function provides after the callback function is finished.
* User application keeps using pointer of image buffer that Strm_DequeueRequest() function provides after queuing it using Strm_EnqueueRequest().

The followings are the solution for this issue.
* Adopts exclusive control to prevent from overwriting an image during it is used.
* Prepares multiple image buffers to separate buffer for updating image and buffer for processing or drawing image, (Multiple buffering, Double buffering).

Double buffering with exclusive control is frequently used for preventing this issue.
Even if user application uses double buffering, this issue may occur at the timing of swapping buffer for updating and buffer for processing.
Using local variable for buffer index of buffer pointer will be helpful for avoiding this issue.

If performance of CPU or USB adapter is not enough, similar issue may occur in the early version BU1203M.
Refer to FAQ "Corrupted images are acquired from BU1203MCF camera".

back

Was this FAQ helpful?

Please let us know your opinion about the FAQ so that we will be able to improve our FAQ. (Within 800 characters)
Note: If you need a reply to your inquiry (e.g. inquiry about products), please use the inquiries form provided on Contact Us page. Please note that we cannot answer to your questions filled in below.

Please click below to change the cookie settings used on our website.