# Unable to change exposure-time of a camera

**URL:** <https://forums.developer.nvidia.com/t/unable-to-change-exposure-time-of-a-camera/67800>\
**Category:** Jetson TX2\
**Created:** [November 26, 2018, 5:04pm UTC](https://forums.developer.nvidia.com/t/unable-to-change-exposure-time-of-a-camera/67800 "2018-11-26T17:04:23Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicolas.hilaire](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@nicolas.hilaire](https://forums.developer.nvidia.com/u/nicolas.hilaire)\
**Post date:** [November 26, 2018, 5:04pm UTC](https://forums.developer.nvidia.com/t/unable-to-change-exposure-time-of-a-camera/67800/1 "2018-11-26T17:04:23Z")

</div>

I’m using an IMX219 sensor on a TX2.  
I have updated kernel and device tree with a similar method than this web site:

> **[Raspberry Pi Camera on TX2](http://cospandesign.github.io/linux,tx2,kernel,driver/2017/12/15/tx2-rpi-camera-port.html)**
>
> DescriptionFirst, I’m not an expert, I learned a lot by reading and hacking on this so there may be misunderstanding on my part and if you find something tha...

The camera works well with gstreamer.  
The camera doesn’t works with the argus library.

So for my software I’m using gstreamer programatic api.  
It almost works well !

I have a major problem that’s remains:  
I can’t change exposure-time.

On the preliminary version of our product we used JetPack 3.1 and the exposure-time could be changed.  
With exactly the same software on a JetPack 3.3 version I can’t change the exposure-time.

Here is a little extract of my code:

```auto
g_object_set (m_source, "auto-exposure", (gint)1, NULL);
g_object_set (m_source, "exposure-time", (gfloat)0.005, NULL);

```

When I read the exposure-time using g\_object\_get function, the value is up to date.  
If I set 0.005 or 0.5 on my other board on JetPack 3.1 I can see the difference easily.  
On JetPack 3.3 there is no difference at all.

If I change other params with the same command like

```auto
g_object_set (m_source, "tnr-mode", 1, NULL);
g_object_set (m_source, "tnr-strength", (gfloat)0.5, NULL);

```

I can see the result in real time !

Any idea ?

---

<div class="post-metadata">

**Author:** ![JerryChang](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/jerrychang/32/14043_2.png) [@JerryChang](https://forums.developer.nvidia.com/u/JerryChang)\
**Post date:** [November 27, 2018, 3:21am UTC](https://forums.developer.nvidia.com/t/unable-to-change-exposure-time-of-a-camera/67800/2 "2018-11-27T03:21:03Z")

</div>

hello nicolas.hilaire,

please refer to [Topic 1033150](https://devtalk.nvidia.com/default/topic/1033150), we had done the implementation to control gainRange, and exposureTimeRang with Argus plugin. please expect this will be include in the next public release. thanks

---

<div class="post-metadata">

**Author:** ![nicolas.hilaire](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@nicolas.hilaire](https://forums.developer.nvidia.com/u/nicolas.hilaire)\
**Post date:** [November 27, 2018, 7:35am UTC](https://forums.developer.nvidia.com/t/unable-to-change-exposure-time-of-a-camera/67800/3 "2018-11-27T07:35:24Z")

</div>

Thanks for your answer but I can’t use libargus with the imx219 driver, the cam isn’t seen by argus.  
Have you an idea why it was working and now why it doesn’t work ?

---

<div class="post-metadata">

**Author:** ![JerryChang](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/jerrychang/32/14043_2.png) [@JerryChang](https://forums.developer.nvidia.com/u/JerryChang)\
**Post date:** [November 30, 2018, 3:21am UTC](https://forums.developer.nvidia.com/t/unable-to-change-exposure-time-of-a-camera/67800/4 "2018-11-30T03:21:07Z")

</div>

hello nicolas.hilaire,

> [@](#):
>
> _The camera works well with gstreamer._  
> _The camera doesn’t works with the argus library._

may I know what’s your commands to access camera with gstreamer,  
could you please also share what’s the failure, thanks

---

<div class="post-metadata">

**Author:** ![nicolas.hilaire](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@nicolas.hilaire](https://forums.developer.nvidia.com/u/nicolas.hilaire)\
**Post date:** [November 30, 2018, 2:46pm UTC](https://forums.developer.nvidia.com/t/unable-to-change-exposure-time-of-a-camera/67800/5 "2018-11-30T14:46:38Z")

</div>

I try many commands in shell to make tests easier :

```auto
gst-launch-1.0 nvcamerasrc fpsRange="15 15" auto-exposure=1 wbmode=0 scene-mode=3 flicker=0 intent=3 wbManualMode=3 aeLock=true exposure-time=0.0001 ! nvoverlaysink

```

provides me same results as

```auto
gst-launch-1.0 nvcamerasrc fpsRange="15 15" auto-exposure=1 wbmode=0 scene-mode=3 flicker=0 intent=3 wbManualMode=3 aeLock=true exposure-time=0.0001 ! nvoverlaysink

```

Or light command lines :

```auto
gst-launch-1.0 nvcamerasrc fpsRange="2 15" auto-exposure=1 exposure-time=.001 ! nvoverlaysink

```

If I change exposure-time on JetPack 3.2 it’s working and on JetPack 3.3 it doesn’t.

For argus I have made test some month ago, I don’t remember the failure.

---

<div class="post-metadata">

**Author:** ![JerryChang](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/jerrychang/32/14043_2.png) [@JerryChang](https://forums.developer.nvidia.com/u/JerryChang)\
**Post date:** [December 3, 2018, 8:10am UTC](https://forums.developer.nvidia.com/t/unable-to-change-exposure-time-of-a-camera/67800/6 "2018-12-03T08:10:08Z")

</div>

hello nicolas.hilaire,

thanks for sharing these testing results.  
we will check this internally, will get back to you once we have conclusions.  
thanks

---

<div class="post-metadata">

**Author:** ![JerryChang](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/jerrychang/32/14043_2.png) [@JerryChang](https://forums.developer.nvidia.com/u/JerryChang)\
**Post date:** [December 4, 2018, 8:30am UTC](https://forums.developer.nvidia.com/t/unable-to-change-exposure-time-of-a-camera/67800/7 "2018-12-04T08:30:05Z")

</div>

hello nicolas.hilaire,

there’s issue that nvcamerasrc did not handle the exposure-time setting correctly,  
could you please replace the /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvcamera.so with the attachment, thanks

[200472736\_Dec04\_libgstnvcamera.tar.gz](https://forums.developer.nvidia.com/uploads/short-url/1Ervw7PuzKeD6AYpemJBiW2cJJZ.gz) (38.5 KB)

---

<div class="post-metadata">

**Author:** ![nicolas.hilaire](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@nicolas.hilaire](https://forums.developer.nvidia.com/u/nicolas.hilaire)\
**Post date:** [December 4, 2018, 11:00am UTC](https://forums.developer.nvidia.com/t/unable-to-change-exposure-time-of-a-camera/67800/8 "2018-12-04T11:00:26Z")

</div>

Thanks for your answer.

When I run it in command line with your attached file, I can change successfully the exposure-time parameter !  
But the white balanced is deactivated.

I start the camera with different fixed exposures I can see a darker or a lighter image. But the white balance never try to make the picture lighter or brighter like it did in JetPack3.1.

Is the software you provide me, an up to date version ?

---

<div class="post-metadata">

**Author:** ![JerryChang](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/jerrychang/32/14043_2.png) [@JerryChang](https://forums.developer.nvidia.com/u/JerryChang)\
**Post date:** [December 5, 2018, 3:22am UTC](https://forums.developer.nvidia.com/t/unable-to-change-exposure-time-of-a-camera/67800/9 "2018-12-05T03:22:56Z")

</div>

hello nicolas.hilaire,

yes, this is pre-build library is based-on JetPack-3.2 release.  
may I know what’s your environment setups and how you determine the while balance, it would be helpful if you could attach the result images.  
several experiments for testing:

1. could you please confirm you were running in auto while balance mode.
2. can you see the difference by setting to different while balance mode.
3. is the manual wb configuration works when changing to manual white balance mode

---

<div class="post-metadata">

**Author:** ![nicolas.hilaire](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@nicolas.hilaire](https://forums.developer.nvidia.com/u/nicolas.hilaire)\
**Post date:** [December 5, 2018, 10:50am UTC](https://forums.developer.nvidia.com/t/unable-to-change-exposure-time-of-a-camera/67800/10 "2018-12-05T10:50:11Z")

</div>

Ok I will try to answer as much as I can to your questions :

Firstly to make my tries, I start the gstreamer command line, I see the picture and few seconds after I put a lamp in front of the camera to force it to reduce wb gain.  
If the white balance is automatic, I must see variation of the whole picture luminosity.

1/ I’ve try with and without white balance mode

Here are the command lines I’ve tried

```auto
$ gst-launch-1.0 nvcamerasrc fpsRange="15 15" auto-exposure=1 exposure-time=.01 wbmode=0 ! nvoverlaysink
$ gst-launch-1.0 nvcamerasrc fpsRange="15 15" auto-exposure=1 exposure-time=.01 wbmode=1 ! nvoverlaysink
$ gst-launch-1.0 nvcamerasrc fpsRange="15 15" auto-exposure=1 exposure-time=.1 wbmode=1 ! nvoverlaysink
$ gst-launch-1.0 nvcamerasrc fpsRange="15 15" auto-exposure=1 exposure-time=.01 wbmode=3 ! nvoverlaysink

```

2/ No I don’t see any difference

3/ I’ve tried programmatically to change manual gains without any success too

```auto
g_object_set (m_source, "wbManualMode", (gint)3, NULL);

	GArray * array = g_array_new (FALSE, FALSE, sizeof(gfloat));
	gfloat gain = 16.0;
	gfloat halfGain = gain / 2.0;
	g_array_append_val(array, gain);
	g_array_append_val(array, halfGain);
	g_array_append_val(array, halfGain);
	g_array_append_val(array, gain);
	g_object_set (m_source, "wbGains", array, NULL);
	g_array_free (array, FALSE);

```

Relevant facts :

- When I use other wb gains like incendescent (3) or fluorescent (4) the global white balance change. The image is more yellow or more blue depending of the chosen wbmode.

- With the original .so file previous command lines make the luminosity changes

Hope it helps.

---

<div class="post-metadata">

**Author:** ![JerryChang](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/jerrychang/32/14043_2.png) [@JerryChang](https://forums.developer.nvidia.com/u/JerryChang)\
**Post date:** [December 6, 2018, 2:13am UTC](https://forums.developer.nvidia.com/t/unable-to-change-exposure-time-of-a-camera/67800/11 "2018-12-06T02:13:13Z")

</div>

hello nicolas.hilaire,

according to your comment[#10](https://devtalk.nvidia.com/default/topic/1044552/jetson-tx2/unable-to-change-exposure-time-of-a-camera/post/5301697/#5301697), it seems there’s bug for AWB.  
since this topic is filed for exposure-time issue originally.  
I would suggest you open another new topic with all the details in comment #8 and #10, and share the linkage in the end of this thread. thanks!

---

<div class="post-metadata">

**Author:** ![nicolas.hilaire](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@nicolas.hilaire](https://forums.developer.nvidia.com/u/nicolas.hilaire)\
**Post date:** [December 6, 2018, 8:08am UTC](https://forums.developer.nvidia.com/t/unable-to-change-exposure-time-of-a-camera/67800/12 "2018-12-06T08:08:16Z")

</div>

I created antoher post for the white balance problem:

[url][https://devtalk.nvidia.com/default/topic/1044971/jetson-tx2/issue-on-white-balance-using-nvcamerasrc-and-gstreamer/[/url]](https://devtalk.nvidia.com/default/topic/1044971/jetson-tx2/issue-on-white-balance-using-nvcamerasrc-and-gstreamer/%5B/url%5D)

Have you any clue for me or an other temporary version with the two factors corrected ? Even blocked in auto exposure or blocked in manual with coefficients working ?

Thanks

---

<div class="post-metadata">

**Author:** ![JerryChang](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/jerrychang/32/14043_2.png) [@JerryChang](https://forums.developer.nvidia.com/u/JerryChang)\
**Post date:** [December 13, 2018, 9:22am UTC](https://forums.developer.nvidia.com/t/unable-to-change-exposure-time-of-a-camera/67800/13 "2018-12-13T09:22:03Z")

</div>

hello nicolas.hilaire,

FYI, the fix in [comment #7](https://devtalk.nvidia.com/default/topic/1044552/jetson-tx2/unable-to-change-exposure-time-of-a-camera/post/5301374/#5301374) already check-in our release code-line,  
please expect this will be include in next public release (for example, l4t-r28.3)  
thanks

---

<div class="post-metadata">

**Author:** ![nicolas.hilaire](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@nicolas.hilaire](https://forums.developer.nvidia.com/u/nicolas.hilaire)\
**Post date:** [December 13, 2018, 9:28am UTC](https://forums.developer.nvidia.com/t/unable-to-change-exposure-time-of-a-camera/67800/14 "2018-12-13T09:28:42Z")

</div>

Thanks, Have you any information on the other issue with the white balance ? (cf [url][https://devtalk.nvidia.com/default/topic/1044971/jetson-tx2/issue-on-white-balance-using-nvcamerasrc-and-gstreamer/post/5301950/#5301950[/url]](https://devtalk.nvidia.com/default/topic/1044971/jetson-tx2/issue-on-white-balance-using-nvcamerasrc-and-gstreamer/post/5301950/#5301950%5B/url%5D))

---

<div class="post-metadata">

**Author:** ![JerryChang](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/jerrychang/32/14043_2.png) [@JerryChang](https://forums.developer.nvidia.com/u/JerryChang)\
**Post date:** [December 13, 2018, 9:39am UTC](https://forums.developer.nvidia.com/t/unable-to-change-exposure-time-of-a-camera/67800/15 "2018-12-13T09:39:16Z")

</div>

hello nicolas.hilaire,

AWB issue is under investigation internally.  
will update the status at [Topic 1044971](https://devtalk.nvidia.com/default/topic/1044971/) while we come out some conclusions.  
thanks

---

<div class="post-metadata">

**Author:** ![nadeemm](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/nadeemm/32/367020_2.png) [@nadeemm](https://forums.developer.nvidia.com/u/nadeemm)\
**Post date:** [October 18, 2021, 6:31pm UTC](https://forums.developer.nvidia.com/t/unable-to-change-exposure-time-of-a-camera/67800/16 "2021-10-18T18:31:03Z")

</div>

Closed on October 18, 2021, 6:31pm UTC


