'Change OpenCV float image default palette range from [0 1] to some custom [min max]
Is it possible to change OpenCV float image default palette range from [0 1] to a custom [min max]?
Mat img(h, w, CV_32FC1); // Create float image
DoStuff(img); // Fill data
ChangePaletteMinMax(img); // Is it possible to change the default palette? Or I need to normalize it to [0 1] ?
imshow("My float image", img); // The greyscale is only from 0 to 1.
Solution 1:[1]
You can use normalize() to set your custom range:
normalize(img, dst, 0, 255, NORM_MINMAX, CV_8UC1)
In the above, the range has been set to 0 - 255.
Solution 2:[2]
I think your network firewall not support STUN ( udp hole punching ) so you have to add turn server address to your iceConfiguration.
you can get turn server address https://www.twilio.com/stun-turn
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | |
| Solution 2 | Hiroo |
