Hello. New to AMB82 Mini, have questions about 3DNR and a few others

Hello, new here. And relatively new to these boards. But I got it partially up and running. I cant seem to find any easily accessible settings for 2DNR/3DNR. I got the bitrate figured out, but still have a pretty blocky smeary image I’m starting to think TNR is the culprit. I’ve dug around a little bit and found some 3DNR/TNR entries in various files but none of them are obvious “heres the setting” files. Any steering into the right direction is appreciated. This is problem #1 of a few right now. Thanks! NK

Running the 4.1.0 I believe everything is up to date. Its running, sorta. Just need to finalize some things Id like it to be doing that its not doing.

Hi, @NKFlorida

SDK 4.1.0 is the Arduino SDK, and currently it does not provide the APIs required to control the features you are looking for.

Alternatively, you can refer to our FreeRTOS GitHub repository, which provides SDK support for these APIs and should better fit your requirements.

Regards

Thank you. I will look into that other option, but do you know if access to the 2DNR/3DNR is something planned to be made available in coming updates? It seems like a pretty base/important feature to have on this unit. The current TNR/3DNR is very aggressive, I would think it wouldn’t be hard to give access to it…either adjust its strength or even a simple on/off.

Edit/Add: I acually did figure out a way to disable the TNR. Its off. isp_ctrl_api.h

Now the goal will be to see what range, if any, it had and where the default was.

If its 1 to 10 and it defaults at 5, maybe setting it to 1 is the best. Picture is a bit noisy now but certainly beats the waxy, smeary image I had before

The normal CameraSetting controls do not control 3DNR/TNR. The Realtek ISP exposes it separately through isp_ctrl_api.h.

Add this include:

extern "C" {
#include "isp_ctrl_api.h"
}

Then, after Camera.videoInit() and Camera.channelBegin(), wait briefly and disable TNR:

delay(1000);

// Disable 3DNR / Temporal Noise Reduction
isp_set_tnr(0);

Example placement:

Camera.videoInit();

Camera.channelBegin(0);
Camera.channelBegin(1);

delay(1000);

// 3DNR / TNR OFF
isp_set_tnr(0);

isp_set_tnr(0) = OFF
isp_set_tnr(1) = ON

That’s it. It is a separate ISP control and should not be put inside Camera.updateVideoParams().

Optional readback:

int tnr;
isp_get_tnr(&tnr);
Serial.print("TNR = ");
Serial.println(tnr);

A readback value of 0 indicates TNR is disabled.

This is working on mine. I even have a little toggle on my WebUI to turn TNR/3DNR on/off. The jump between on and off is massive though. So I’m guessing whatever the default starting value for TNR is must be pretty agressive. I think in my scenario a “little bit” of 3DNR wouldn’t hurt, but if my options are waxy smeared oil painting or noise I’m guess I’m stuck with noise.

Any pointers to getting into the actual range/values for what I’m turning on/off right now would be great. I’d be stoked with just an on/off “if” the “on” wasnt so aggressive.

Great achievement! Thanks for sharing.

Yes, Arduino and FreeRTOS are using the same underlying base, so the FreeRTOS SDK APIs can work in the Arduino environment as well.

Please allow me some more time to look into this in more depth and add some of the APIs you suggested to the Arduino environment.

Thanks. I’m slowly getting close to making the AMB82 mini do the things I need it to do.

Access to the actual VALUES for the 3DNR/TNR would be amazing.

On/Off is a start, but whatever the default value is for “ON” is pretty aggressive.

I’m still struggling with getting it to properly timestamp the REC0, REC1, REC2 etc files.

I’m ok with generic names “if” they have a proper timestamp so I know WHEN they were made.

Other than that;

Looping appears to work.

A simpl WebUI with ISP settings, start/stop recording, file manager with wipe/format option, and a reboot button seem to work, albeit clunky.

The 3DNR is just smearing the video too much. I do have a question though, is 2DNR factored in here? Are they combined into one “Noise Reduction” or are they seperate mechanisms?

The noise with the 3DNR completely disabled is immense. It almost makes me wonder if its disabling 2DNR as well? It appears that ALL (both?) noise reduction disappears.

Hi @NKFlorida,

3DNR is on by default. 2DNR is currently not supported yet in the Arduino SDK.

Although v4.1.0 does not support 3DNR, you can try with the pre-release version 4.1.1-20260813 and navigate to Multimedia → ISP control → 3DNR example. This example can be enabled and disabled via serial input, similar to other examples.

3DNR=1 // 3DNR enabled
3DNR=0 // 3DNR disabled
3DNR // check value

To install pre-release version, add https://github.com/Ameba-AIoT/ameba-arduino-pro2/raw/dev/Arduino_package/package_realtek_amebapro2_early_index.json in Preferences.

If you are referring to MP4 recording, you can try SingleVideoWithAudioAndNTPClient/ DoubleVideoWithAudioAndNTPClient which integrated with NTPClient being able to set the last modified time of the recordings to the actual time and date automatically.

Guide: MP4 Recording — Ameba Arduino AIoT Documentation v1.1 documentation

Very cool.

Out of curiosity, for the 3DNR…does “Check Value” mean 1 ON, 0 OFF or is the value the actual strength of the 3DNR being applied?

Also the note of 2DNR not existing, while digging through the VOE it almost looks like “noise reduction” is indeed split between the two. I’m guessing here that;

TNR is Temporal, SNR is Spatial

29784 after tnr of long exp path
2985e after snr of short exp path
2e9b4 ZnRj
2f846 [%s][%u]Err%s [%d] discrete %d %d continuous %d %d nr_discrete %d %d
2f88e [%s][%u]Err%s nr_continuous%d %d de_discrete%d %d de_continuous %d %d
2fea6 Noise reduction level
3278c [%s][%u]Errset tnr enable failed, ret = %d
33e2c Temporal denoise
33e3d [%s][%u]Erradd tnr ctrls fail → %d
33f8f p[%s][%u]Errget tnr hw ops fail
3401b ptnr
34053 pisp_mod_tnr_init
34065 isp_mod_tnr_add_ctrl
3adb8 [%s][%u]Errget snr hw ops fail
3af03 Bsnr
3af3f psnr
3af6b pisp_mod_snr_init
3f1bf pstreaming when verify path disable tnr

There are different “init” for the two different “nr” types. At least that’s what I’m thinking by looking at it.

Also, “Noise Reduction Level” would lead me to believe theres a variable there, beyond a simple on/off. Something is telling it "Noise reduction? On/Off…If “on” Noise Reduction set to 50/100 as the default.

Whatever that default “Noise Reduction Level” may be, it’s quite agressive and the ability to tune it would be amazing.

Yes, I used the example for the MP4 recording. It still doesn’t seem to want to work, I think something else in my sketch is messing it up. One version I did have it stamping files but it would only work for about the first 6 or 7 then stopped, making the rest all 2016 date

The value indicates whether the feature is enabled or disabled.

Let me test it and get back to you. In the meantime, you can also share the code with me.

working6addreboot_copy_20260818082213.7z (10.7 KB)

This is how far I’ve gotten. The goal is basically a little standalone IP camera. But still in the setup/testing phase. Ultimately will probably switch it to H265, 5 minute files, a few other small changes but this is the bones so far. Goals being;

  • 5 Minute files (working now with 1 minute files, easy change)
  • Proper Time Stamps on those files (works for a few minutes then breaks)
  • Ideally a working OSD overlay with correct time on the video itself (not working)
  • Basic WebUI for adjusting ISP setting (Working albeit clunky)
  • Basic File Manager system for the WebUI (Working albeit clunky)
  • CH0 Main Stream straight to SD card (Working)
  • CH1 Substream for live view checking/setup (Working)
  • Adjustability and Seperation of 3DNR and 2DNR (Not even close…)

I really like the form factor of the unit. I added an extension for the ribbon cable on the camera and have it in an enclosure that fits my needs. Lens swapped to one without an IR filter so I can use it at night with external IR (just drop the saturation to zero for B&W)

My only problems at the moment are:

  • I think disabling the “3DNR” is actually disabling both the 2DNR (SNR) and 3DNR (TNR)
  • When “3DNR” is enabled the default settings is way way way too aggressive.
  • All my attempts at a OSD for time/date have failed, typically the clock doesnt update
  • The complicated timestamping mechanism I have fails/breaks after a few minutes

But at the end of the day its really the 3DNR/2DNR problem killing this thing.

I have another small IP camera with the same F37 sensor, I know its capable of putting out a “ok” picture but I basically have a toggle switch that picks between “insane noise” and “waxy smeared oil painting” with nothing in between…

Also out of curiosity, do these AMB82 Mini’s ship with the standard F37 or the F37P sensor?

Just curious if there’s a plug and play sensor upgrade I can look into that may help with the noise. I belive the “P” is a little better in handling noise/low light. But if it already has the P in it I don’t have anywhere to move up.

Hi @NKFlorida,

Sorry for the late reply,

You may refer to this patch and apply it to your project to see whether the timestamp can be updated consistently.
VideoOnlyNTP_Patch.zip (6.1 KB)

The previous issue may have occurred because the implementation only handled specific filenames and a certain number of recorded files.

AMB82 Mini ship with F37P. (would like to amend on this answer)
MS-SA81808A01-R-F37-220824_(new_FPC_21mm_length).zip (363.5 KB)

You may also refer to Download Center for more datasheet and userguide.

Thank you.

To set the correct timestamp for OSD, you may refer to How to sync RTC date and time with OSD.

For 3DNR, you can refer to Tuning Guide ENG — AmebaPro2's Documentation v0.1 documentation

It can be done by IQ tuning tool, ameba-tool-rtos-pro2/IQ Tuning at main · Ameba-AIoT/ameba-tool-rtos-pro2 · GitHub

An activation key is needed to use the IQ tuning tool, RealCam.

After running RealCam.exe, you should see a pop-up window, click on the dump to generate Realcam_activation.bin and send it to us.

Thank you, I will look into that tool.

As for the F37 question, if it ships with the F37 stock…where would one find the F37P from this same maker/correct pinout? I’m guessing the F37[b]P[/b] being an upgraded sensor might have some better SNR or handle this noise better. It appears we are very very limited on what sensors we can actually use on these little boards.

EDIT: Nevermind, I see you ammendment above.

Ok, little update. Thank you guys for getting that RealCam bin so quickly.

But I have to say, getting that setup was a very unpleasant experience but after several hours of screwing around with it, I finally got RealCam to see my camera.

The problem is all it sees is a pure white square and any attempts to use the software are generally unresponsive. I was able to get a serial monitor to try to see where it’s hanging up (if at all) and I got this.

Am I supposed to go back and change a bunch of stuff and rebuild, reflash just randomly until I find some configuration that this this likes? Or is there a configurations its expecting to see and I’m just not doing it right? I didn’t see anything about WDR or other settings in that tutorial being reasons for failure here. Please advise. Thank you.

Hi @NKFlorida ,

It seems like you are using Arduino SDK for the UVCD example compilation, could you try modifying the UVCD_pram.h and build again? Kindly enable only one format of UVCD to avoid crashing when unsupported format is enabled.

#define UVCD_YUY2 0
#define UVCD_NV12 0
#define UVCD_MJPG 0
#define UVCD_H264 1
#define UVCD_H265 0

Thank you.

Per the tutorial I downloaded “Ameba Freertos Pro2 SDK (ameba-rtos-pro2)” for compiling this.

I used the Arduino IDE for its serial monitor to see where it was hanging up on boot after multiple failures to get a picture from RealCam. It’s hanging on that WDR line. I did not use the Arduino SDK for the IQ tuning flash

EDIT TO ADD: That worked, I’m in. Thank you. It locks up (program not responding) when trying to use the Pro Tuning tool in the menu but its progress I guess.