# Read image counter

**URL:** <https://forum.commonvisionblox.com/t/read-image-counter/763>\
**Category:** C++ API\
**Tags:** discovery, genicam\
**Created:** [May 13, 2019, 7:12am UTC](https://forum.commonvisionblox.com/t/read-image-counter/763 "2019-05-13T07:12:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lhartu](https://avatars.discourse-cdn.com/v4/letter/l/91b2a8/32.png) [@lhartu](https://forum.commonvisionblox.com/u/lhartu)\
**Post date:** [May 13, 2019, 7:12am UTC](https://forum.commonvisionblox.com/t/read-image-counter/763/1 "2019-05-13T07:12:49Z")

</div>

Hello  
I’m porting an existing application to CVB and need help finding a simple feature. The camera has an internal counter which is reset by a signal from an external controller.  
My application should now read this counter value of each acquired image. How can I do this?  
I expected a similar function to Image-\>RawTimestamp()

Here is the example code i use for acquisition:

```auto
    auto mDevice = Cvb::DeviceFactory::Open(path);
    auto stream = mDevice->Stream();
    stream->Start();

    while (mRunning)
    {
        auto waitResult = stream->WaitFor(std::chrono::seconds(1));
        if (waitResult.Status == Cvb::WaitStatus::Ok){
            std::cout << "Acquired image... " << waitResult.Image->RawTimestamp() << std::endl;
            ....
        }
    }
    stream->Stop();

```

Thank you!  
Lukas

---

<div class="post-metadata">

**Author:** ![Sebastian](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/sebastian/32/1267_2.png) [@Sebastian](https://forum.commonvisionblox.com/u/Sebastian)\
**Post date:** [May 13, 2019, 1:52pm UTC](https://forum.commonvisionblox.com/t/read-image-counter/763/2 "2019-05-13T13:52:53Z")

</div>

Hi @lhartu and welcome to the CVB Forum,

If you use a GenICam compliant camera you need to access most of the features by using the NodeMap.  
I found an example in this post:  
[https://forum.commonvisionblox.com/t/genapi-stringnode-value-access/263/2?u=sebastian](https://forum.commonvisionblox.com/t/genapi-stringnode-value-access/263/2)

In your case it would probably be an integer node so you need to use the IntegerNode class:

```
auto integerNode = deviceNodeMap->Node<Cvb::IntegerNode>(CVB_LIT(DeviceVendorName));
auto value = integerNode->Value();
```
