Ask Your Question

kmaster's profile - activity

2018-01-22 09:38:59 -0600 received badge  Nice Answer (source)
2018-01-22 09:19:05 -0600 received badge  Teacher (source)
2018-01-22 08:30:11 -0600 commented answer Wierd bug - cv::rotate corrupts images.

@berak Yeas me too I am very happy. Thank you for your support and suggestions.

2018-01-22 07:53:04 -0600 marked best answer Wierd bug - cv::rotate corrupts images.

Hi,

I have been tracking this bug for quite some time now, so any suggestion would be welcome. I use OpenCV as part of the server, which uses OpenCV for image processing. The server is written in Golang and uses our custom binding to OpenCV.

One operation is to rotate images, and it works 99% of time correctly when using the same set of images.

Very very rarely the input image will fail (see attachments). There is nothing special about input images. Actually, the same image would go through rotation without corruption at any other time before suddenly failing.

On the server with 8 instances changing content every minute, it would fail once every few days.

I have written the unit test that repeats rotate and some other operations in multiple threads running in a loop. Test does not seam to catch any corruptions, but it does create heavy CPU and memory load.

Snippet showing how do we use cvTranspose() to implement image rotation. (It is a Go code using C bindings)

I have already posted the same question to slack, and I was given the recommendation to update to v 3.x.x. and use new 'rotate()' function.

I will probably try this, but the reason I post this here again is:

  • My concern is that there is either bug in OpenCV cvTranspose function (unlikely) or that there is the problem with the way we use OpenCV (more likely), and that in that case changing the function won't solve any problem. It is really hard for me right now to confirm that after the change I did solve the problem, because of bugs rare occurrence.
  • as a reference for a possible future bug report

Samples of corrupted images dumpede by 'cvTranspose()'. Images are gray but are actualy in RGBA format.

sample1

sample2

root@1c4b88d5e5b5:~/vss# uname -a

Linux 1c4b88d5e5b5 4.4.0-89-generic #112-Ubuntu SMP Mon Jul 31 19:38:41 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

root@1c4b88d5e5b5:~/vss# cat /etc/issue Ubuntu 16.04 LTS \n \l

root@1c4b88d5e5b5:~/vss# dpkg -l | grep opencv

ii libopencv-core2.4v5:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 computer vision core library

ii libopencv-imgproc2.4v5:amd64 2.4.9.1+dfsg-1.5ubuntu1 amd64 computer vision Image Processing library

golang version 1.9.2

$ docker version # servers is running inside docker

Client:

Version: 17.09.0-ce

API version: 1.32

Go version: go1.8.3

Git commit: afdb6d4

Built: Tue Sep 26 22:42:18 2017

OS/Arch: linux/amd64

Server:

Version: 17.09.0-ce

API version: 1.32 (minimum version 1.12)

Go version: go1.8.3

Git commit: afdb6d4

Built: Tue Sep 26 22:40:56 2017

OS/Arch: linux/amd64

Experimental: false

2018-01-22 07:30:09 -0600 received badge  Necromancer (source)
2018-01-22 07:30:09 -0600 received badge  Self-Learner (source)
2018-01-22 06:55:09 -0600 answered a question Wierd bug - cv::rotate corrupts images.

As @break suspected, it was the problem with our wrapper. After code review and slight changes to unit tests to create a

2018-01-15 02:41:15 -0600 received badge  Organizer (source)
2018-01-12 02:37:22 -0600 received badge  Editor (source)
2018-01-12 02:37:22 -0600 edited question Wierd bug - cv::rotate corrupts images.

Wierd bug - cvTranspose corrupts images. Hi, I have been tracking this bug for quite some time now, so any suggestion

2018-01-12 02:36:33 -0600 commented question Wierd bug - cv::rotate corrupts images.

After some time I am back with some news: What have I tried: Upgraded to OpenCV 3.3 Re-compiled OpenCV without OpenCL

2018-01-12 02:36:05 -0600 commented question Wierd bug - cv::rotate corrupts images.

@berak After some time I am back with some news: What have I tried: Upgraded to OpenCV 3.3 Re-compiled OpenCV without

2017-12-14 01:24:10 -0600 commented question Wierd bug - cv::rotate corrupts images.

@berak Glad to see I don't need to recompile ;D Yes I will need to confirm this with tests. And this will take some t

2017-12-14 01:23:31 -0600 commented question Wierd bug - cv::rotate corrupts images.

Glad to see I don't need to recompile ;D Yes I will need to confirm this with tests. And this will take some time It

2017-12-14 00:11:27 -0600 commented question Wierd bug - cv::rotate corrupts images.

@berak Thank you for a suggestion. How do I know if I a box is using ipp/OpenCL? How do I disable it? Do I need to recom

2017-12-14 00:11:03 -0600 commented question Wierd bug - cv::rotate corrupts images.

@berak Thank you for a suggestion. How do I know if I a box is using ipp/OpenCL? How do I disable it? Do I need to recom

2017-12-13 23:47:04 -0600 commented question Wierd bug - cv::rotate corrupts images.

@berak Thank you for a suggestion. How do I know if I a box is using ipp/OpenCL? How do I disable it? Do I need to recom

2017-12-13 23:33:39 -0600 commented question Wierd bug - cv::rotate corrupts images.

@berak Thank you for a suggestion. How do I know if I a box is using ipp/OpenCL? How do I disable it? Do I need to recom

2017-12-13 09:50:35 -0600 commented question Wierd bug - cv::rotate corrupts images.

@berak I found working link for gocv ;D

2017-12-13 09:46:41 -0600 commented question Wierd bug - cv::rotate corrupts images.

@berak https://github.com/gocv doesn't seem to be publicly available. "This organization has no public repositories."

2017-12-13 09:03:16 -0600 asked a question Wierd bug - cv::rotate corrupts images.

Wierd bug - cvTranspose corrupts images. Hi, I have been tracking this bug for quite some time now, so any suggestion