What is the fastest way to eliminate noise in the frames ?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
What is the fastest way to eliminate noise in frames for real time applications?
I am asking specifically what is the fastest for noisy pixels for real time app?
7 Kommentare
Walter Roberson
am 4 Okt. 2023
Are we to understand that this is a question related to Simulink Real-time Toolbox for running on Speedgoat hardware? Or are you using the Linux distribution that was designed to support real-time extensions and you are using MATLAB Coder to generate the code framework with dynamic memory allocation turned off? (You can't do real-time work when there is a variable amount of time needed to allocate memory.)
Antworten (1)
Walter Roberson
am 9 Okt. 2023
What is the fastest way to eliminate noise in frames for real time applications?
The fastest way is to use zeros() to set the output to a constant value.
When you use zeros() specifically (no other function!) then internal short-cuts are used which save time in memory allocation.
But you should do timing tests comparing to calling https://www.mathworks.com/matlabcentral/fileexchange/31362-uninit-create-an-uninitialized-variable-like-zeros-but-faster which just might be slightly faster... not necessarily. Although uninitialized arrays should in theory be faster (since the operating system just needs to return the pointer to the area), it is common for memory controllers to have a Demand Zero memory allocation function that uses hardware assistance to zero the memory.
To be more explicit: the fastest way is to set the output to a constant without looking at the input at all -- and it is common for the special constant 0 to be the fastest constant to use to initialize.
If you want the input to somehow control the output, then the fastest thing to do is to use as little as the input as possible and do as little calculation with it as possible. Depending on the hardware, keeping all of the calculation within 8 bytes (one doublee) or 64 bytes or 128 bytes (varies with CPU) is fastest (a single "cache-line")
0 Kommentare
Siehe auch
Kategorien
Mehr zu Image Segmentation and Analysis finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!