Comments (2)
I think there is no bug in normalize
import numpy as np
import cv2 as cv
data = np.array([0, 2, 20, 103., 240., 15.], dtype=np.float32)
norm_opencv = cv.normalize(data, None, 0, 255, cv.NORM_MINMAX)
dMin=0
dMax =255
smax = np.max(data)
smin = np.min(data)
scale = (dMax- dMin)* 1 /(smax - smin )
shift = dMin - smin*scale
norm_numpy = data * scale + shift
print(np.max(np.abs(norm_opencv-norm_numpy)))
Result 0.0
if something is weird it is in python binding for np.array to Mat or UMat
from opencv.
Hello, thank you for the reply. Indeed with the values from your example there is no difference. However when I change your example values to the values from my example, there is the same difference that I reported in the beginning. Could you please double check that this happens with my values on your side as well?
from opencv.
Related Issues (20)
- When creating a framework for VisionOS, specifying "--dynamic" argument causes a build error. HOT 1
- terminate called after throwing an instance of 'cv::Exception' what(): OpenCV(4.5.4) ./modules/dnn/src/onnx/onnx_importer.cpp:739: error: (-2:Unspecified error) in function 'handleNode' > Node [Identity]:(onnx::Reshape_395) parse error: OpenCV(4.5.4) ./modules/dnn/src/dnn.cpp:5653: error: (-215:Assertion failed) inputs.size() in function 'getMemoryShapes' HOT 4
- Failed to load module gail and atk-bridge while compiling a simple C++ program HOT 2
- When binding APIs in opencv.js, corresponding structs/enums should be bound HOT 1
- cv2.CAP_ANY (MSMF) not support high resolution webcam HOT 2
- Buildroot cross compile on Debian12 + ccache: fatal error: stdlib.h: No such file or directory
- imwrite() to TIFF does not use COMPRESSION_SGILOG for 32FC1 (only 32FC3) HOT 6
- Lens distortion documentation unclear HOT 2
- OpenCV conflict problem for Window popup HOT 3
- Missing typing stub: cv2.SIFT_create()
- Extract inliers from HL Image Stitcher HOT 2
- 3rdparty: Small version expression problems for built-in tiff460
- crash when invoke cv2.intersectConvexConvex HOT 3
- The performance of `cv::parallel_for_` is quite low on Windows HOT 2
- I can not use the "cv::imshow()" fucntion HOT 4
- the function of cv2.denoise_TVL1 HOT 2
- `SIGBUS` crash in `pointSetBoundingRect()` on ARMv7-A (armeabi-v7a) due to unaligned NEON load HOT 2
- support for IPP 2021.10 in OneAPI 2024 HOT 2
- TFLite with OpenCV Issue HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opencv.