Hello,
For my current application I need to make use of the natural logarithm function, Ln(x).
I've seen that Visual Applets does not offer this function in its arithmetic library.
I'd like to ask if there is any support available, or the natural logarithm function has to be implemented.
In case of own implementation, how to tackle this matter?
Thanks in advance.
Greetings,
jsmvub
Natural logarithm function
- jsmvub
- Thread is marked as Resolved.
-
-
Dear jsmvub,
yes the Ln(x) function is not directly implemented as VisualApplets operator. But you may use a LUT operator to implement this function.
-
Dear CarmenZ,
Thanks for the idea. The LUT could help me, but not entirely.
My use case is, I need to do the following calculation:
Ln(A/B)
- A and B can take the values from 1 to 255.
- A is a dynamic CONST
- B is my image
One solution I have in mind is to implement a LUT for a single A value, but if I change A, I need to change the LUT content and recompile again the whole project, quite cumbersome.
Another solution to consider all combinations, is to have a LUT for each A value, but this means that I need 255 LUTs with input 8 bits and output 16 bits because I want to work with floating values in the output.
Best pratice for working with floating constants
Programming will be tedious, and resources high.
Do you have any other suggestions that can help me for my use case of Ln(A/B) ?
Thanks in advance.
-
Dear Jsmvub,
please consider the following suggestion :
Ln(A/B)= Ln(A)- Ln(B);
So you can seperate the problem.
In a Const operator you directly can write the value Ln(A) and for the image data B you can use a LUT .
-
Dear CarmenZ,
Many thanks again for the new idea. I'll implement it.