Ask Your Question

sinojelly's profile - activity

2018-07-19 11:12:34 -0600 marked best answer How to use cvtColor convert UIImage to gray?

I convert UIImage to Mat like this:(On iOS)

UIImageToMat(image1, baseImage, true);

And use imwrite("/home/before.png", baseImage); the output image is ok.

image description

I use the code like this to convert it to gray:

cvtColor(baseImage, baseImageB, COLOR_BGRA2GRAY);

And use imwrite("/home/after.png", baseImageB); the output image is black.

image description

and save it to txt file, it seems that there a many zeros, and at last some lines of 1.94871e+09 or some other value.

And I tried COLOR_BGR2GRAY, RGB2GRAY, RGBA2GRAY, all failed.

How to get the right gray image?

I want to convert image to gray, because it shows the following error. Is there any other ways to fix it? ontours.cpp:199: error: (-210:Unsupported format or combination of formats) [Start]FindContours supports only CV_8UC1 images when mode != CV_RETR_FLOODFILL otherwise supports CV_32SC1 images only in function 'cvStartFindContours_Impl'

Thanks!

2018-07-19 11:12:34 -0600 received badge  Scholar (source)
2018-07-19 11:12:13 -0600 commented answer How to use cvtColor convert UIImage to gray?

It works! Thanks very much!

2018-07-19 09:56:55 -0600 edited question How to use cvtColor convert UIImage to gray?

How to use cvtColor convert UIImage to gray? I convert UIImage to Mat like this:(On iOS) UIImageToMat(image1, baseImage

2018-07-19 09:51:57 -0600 received badge  Editor (source)
2018-07-19 09:51:57 -0600 edited question How to use cvtColor convert UIImage to gray?

How to use cvtColor convert UIImage to gray? I convert UIImage to Mat like this:(On iOS) UIImageToMat(image1, baseImage

2018-07-19 09:50:26 -0600 asked a question How to use cvtColor convert UIImage to gray?

How to use cvtColor convert UIImage to gray? I convert UIImage to Mat like this:(On iOS) UIImageToMat(image1, baseImage

2018-07-18 19:33:11 -0600 commented answer How to compare two handwriting characters to get similarity score

Thanks! Maybe I should try one shot learning or Siamese Network, and I found a paper here, it seems meet my requirements

2018-07-17 19:41:41 -0600 commented answer How to compare two handwriting characters to get similarity score

Thank you for your detailed reply.Yes, I just want to look at similarity between images. I just want to compare the simi

2018-07-16 21:39:39 -0600 commented question How to compare two handwriting characters to get similarity score

If I use CNN, the question of how similar the handwriting is to the standard word is a classification problem or a regre

2018-07-16 03:54:28 -0600 commented question How to compare two handwriting characters to get similarity score

I also thought about CNN or DNN, but I haven't figured out how to convert this problem into a neural network problem. Is

2018-07-16 02:51:57 -0600 asked a question How to compare two handwriting characters to get similarity score

How to compare two handwriting characters to get similarity score I want to compare two handwriting Chinese characters t