# Difference between Cvb.SharedImg and Cvb.Image.IMG

**URL:** <https://forum.commonvisionblox.com/t/difference-between-cvb-sharedimg-and-cvb-image-img/207>\
**Category:** C-style API\
**Tags:** csharp, acquisition, linearaccess, ringbuffer, parallel\
**Created:** [September 4, 2017, 11:01am UTC](https://forum.commonvisionblox.com/t/difference-between-cvb-sharedimg-and-cvb-image-img/207 "2017-09-04T11:01:45Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![andrea.annovi](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@andrea.annovi](https://forum.commonvisionblox.com/u/andrea.annovi)\
**Post date:** [September 7, 2017, 3:18pm UTC](https://forum.commonvisionblox.com/t/difference-between-cvb-sharedimg-and-cvb-image-img/207/5 "2017-09-07T15:18:23Z")

</div>

Thank you for the answer @Sebastian, @parsd, and ‘illusive’. All your answers were really helpful.

At the end I succeeded in creating a duplication of the original image, captured by the camera, using the function: `Image.CreateDuplicateImageEx.` and I’m also able to access linearly `GetLinearAccess`.

In my program I used `SharedImg` object to load the camera driver and then G2Wait and Grab image.  
All works fine, but in a separate task I want to process the image, because in case the processing function takes really long time, I don’t want to block the main thread that is acquiring data.

Therefore I decided to used `Image.CreateDuplicateImageEx.` to create a duplication of the image, acquired by the camera, and to use the duplicated image to process (eg. `GetLinearAccess` and other stuff).  
In this way the main thread that acquired image from the camera, does not have to wait for the processing function to complete.  
To avoid memory leak I also have to release the duplicated image after the processing part it has been completed.

I do not release the camera object during acquisition, but I only dispose the camera object when the acquisition has stopped.

Is it correct what I have implemented?

Thank you in advance.

---

_[View the full topic](https://forum.commonvisionblox.com/t/difference-between-cvb-sharedimg-and-cvb-image-img/207)._
