{"action":"created","issue":{"url":"https://api.github.com/repos/Itseez/opencv_contrib/issues/489","labels_url":"https://api.github.com/repos/Itseez/opencv_contrib/issues/489/labels{/name}","comments_url":"https://api.github.com/repos/Itseez/opencv_contrib/issues/489/comments","events_url":"https://api.github.com/repos/Itseez/opencv_contrib/issues/489/events","html_url":"https://github.com/Itseez/opencv_contrib/issues/489","id":123850982,"number":489,"title":"Opencv3.0.0‘s bug of normalize function","user":{"login":"DengPingFan","id":16174941,"avatar_url":"https://avatars.githubusercontent.com/u/16174941?v=3","gravatar_id":"","url":"https://api.github.com/users/DengPingFan","html_url":"https://github.com/DengPingFan","followers_url":"https://api.github.com/users/DengPingFan/followers","following_url":"https://api.github.com/users/DengPingFan/following{/other_user}","gists_url":"https://api.github.com/users/DengPingFan/gists{/gist_id}","starred_url":"https://api.github.com/users/DengPingFan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DengPingFan/subscriptions","organizations_url":"https://api.github.com/users/DengPingFan/orgs","repos_url":"https://api.github.com/users/DengPingFan/repos","events_url":"https://api.github.com/users/DengPingFan/events{/privacy}","received_events_url":"https://api.github.com/users/DengPingFan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-25T04:09:08Z","updated_at":"2015-12-25T09:02:18Z","closed_at":null,"body":"My platform is windows 64bit,visual stdio 2013,i am using the opencv3.0.0 to test the normalize() function.I have found something wrong with it.\r\n\r\nIf i use in-place way to normalize a CV_64FC1 Mat to a CV_32F it would be wrong.but when use non in-place way to normalize a CV_64FC1 Mat to a CV_32F it would be wright.\r\n\r\n#pragma once\r\n#pragma warning(disable: 4819)\r\n\r\n#ifdef _DEBUG\r\n#define lnkLIB(name) name \"d\"\r\n#else\r\n#define lnkLIB(name) name\r\n#endif\r\n\r\n#include \r\n#include \r\n#define CV_VERSION_ID CVAUX_STR(CV_MAJOR_VERSION) CVAUX_STR(CV_MINOR_VERSION) CVAUX_STR(CV_SUBMINOR_VERSION)\r\n#define cvLIB(name) lnkLIB(\"opencv_\" name CV_VERSION_ID)\r\n#pragma comment( lib, cvLIB(\"core\"))\r\n#pragma comment( lib, cvLIB(\"imgproc\"))\r\n#pragma comment( lib, cvLIB(\"highgui\"))\r\n\r\n#if CV_MAJOR_VERSION == 3\r\n#pragma comment(lib, cvLIB(\"imgcodecs\")) //the opencv3.0 need it\r\n#endif\r\n\r\n#if CV_MAJOR_VERSION == 2\r\n#pragma comment(lib, cvLIB(\"contrib\"))\r\n#endif\r\n\r\n#include\r\n\r\nusing namespace cv;\r\nusing namespace std;\r\n\r\nint main()\r\n{\r\nMat img = Mat::zeros(1, 5, CV_64FC1);\r\n\r\nimg.at<double>(0, 0) = 0.0345;\r\nimg.at<double>(0, 1) = 0.2322;\r\nimg.at<double>(0, 2) = 0.6483;\r\nimg.at<double>(0, 3) = 0.2322;\r\nimg.at<double>(0, 4) = 0.0345;\r\n\r\n//it will be produce wrong result\r\nnormalize(img, img, 1, 0, NORM_MINMAX, CV_32F);\r\n\r\n//it will be produce wright result\r\nMat img1;\r\n//normalize(img, img1, 1, 0, NORM_MINMAX, CV_32F);\r\n\r\nreturn 0;\r\n}"},"comment":{"url":"https://api.github.com/repos/Itseez/opencv_contrib/issues/comments/167211960","html_url":"https://github.com/Itseez/opencv_contrib/issues/489#issuecomment-167211960","issue_url":"https://api.github.com/repos/Itseez/opencv_contrib/issues/489","id":167211960,"user":{"login":"Dikay900","id":448549,"avatar_url":"https://avatars.githubusercontent.com/u/448549?v=3","gravatar_id":"","url":"https://api.github.com/users/Dikay900","html_url":"https://github.com/Dikay900","followers_url":"https://api.github.com/users/Dikay900/followers","following_url":"https://api.github.com/users/Dikay900/following{/other_user}","gists_url":"https://api.github.com/users/Dikay900/gists{/gist_id}","starred_url":"https://api.github.com/users/Dikay900/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dikay900/subscriptions","organizations_url":"https://api.github.com/users/Dikay900/orgs","repos_url":"https://api.github.com/users/Dikay900/repos","events_url":"https://api.github.com/users/Dikay900/events{/privacy}","received_events_url":"https://api.github.com/users/Dikay900/received_events","type":"User","site_admin":false},"created_at":"2015-12-25T09:02:18Z","updated_at":"2015-12-25T09:02:18Z","body":"please do not crosspost these issues across multiple repositories. Stay at the opencv main repository for this issue and close this please."}}