{"action":"closed","issue":{"url":"https://api.github.com/repos/shimat/opencvsharp/issues/124","labels_url":"https://api.github.com/repos/shimat/opencvsharp/issues/124/labels{/name}","comments_url":"https://api.github.com/repos/shimat/opencvsharp/issues/124/comments","events_url":"https://api.github.com/repos/shimat/opencvsharp/issues/124/events","html_url":"https://github.com/shimat/opencvsharp/issues/124","id":106945468,"number":124,"title":"OpenCVSharp overwrites variable","user":{"login":"maickdanckwardt","id":14328156,"avatar_url":"https://avatars.githubusercontent.com/u/14328156?v=3","gravatar_id":"","url":"https://api.github.com/users/maickdanckwardt","html_url":"https://github.com/maickdanckwardt","followers_url":"https://api.github.com/users/maickdanckwardt/followers","following_url":"https://api.github.com/users/maickdanckwardt/following{/other_user}","gists_url":"https://api.github.com/users/maickdanckwardt/gists{/gist_id}","starred_url":"https://api.github.com/users/maickdanckwardt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maickdanckwardt/subscriptions","organizations_url":"https://api.github.com/users/maickdanckwardt/orgs","repos_url":"https://api.github.com/users/maickdanckwardt/repos","events_url":"https://api.github.com/users/maickdanckwardt/events{/privacy}","received_events_url":"https://api.github.com/users/maickdanckwardt/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/shimat/opencvsharp/labels/problem","name":"problem","color":"eb6420"},{"url":"https://api.github.com/repos/shimat/opencvsharp/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-09-17T09:30:15Z","updated_at":"2015-12-19T14:14:13Z","closed_at":"2015-12-19T14:14:13Z","body":"Hi we just have some trouble with the function\r\n\r\n```cs\r\nCv2.MinMaxIdx(InputArray src, out double minVal, out double maxVal, out int minIdx, out int maxIdx, InputArray mask = null)\r\n```\r\n\r\nin OpenCvSharp Version 2.x and 3 loaded via NuGet.\r\n\r\nThe variable declared just before maxIdx is reset by the function MinMaxIdx.\r\n\r\nIn the following example the variable test is valid until we call the function MinMaxIdx and is 0 after the function call.\r\n\r\n```cs\r\nprivate void OpenCVError()\r\n    {\r\n        var mat = new Mat(5, 1, MatType.CV_32FC1);\r\n        var mat2 = new MatOfFloat(mat);\r\n        var indexer = mat2.GetIndexer();\r\n        indexer[0, 0] = 2f;\r\n        indexer[1, 0] = 1f;\r\n        indexer[2, 0] = 3f;\r\n        indexer[3, 0] = 4f;\r\n        indexer[4, 0] = 5f;\r\n        double maxValue, minValue;\r\n        var test = 10;\r\n        int maxIdx, minIdx;\r\n        Console.WriteLine(test);\r\n        Cv2.MinMaxIdx(mat, out minValue, out maxValue, out minIdx, out maxIdx);\r\n        Console.WriteLine(test);\r\n    }\r\n```\r\n\r\nDo you have any ideas?"}}