Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

weibo.cn\spliter\spliter.exe OpenCV Error: Assertion failed #2

Open
minghu6 opened this issue Apr 17, 2017 · 12 comments
Open

weibo.cn\spliter\spliter.exe OpenCV Error: Assertion failed #2

minghu6 opened this issue Apr 17, 2017 · 12 comments

Comments

@minghu6
Copy link
Contributor

minghu6 commented Apr 17, 2017

如题,downloader验证码get后,VS14上生成的spliter.exe运行出现:

../downloader/captchas/00179352-2c1b-42c9-83c2-c88402639381.png
OpenCV Error: Assertion failed (dims <= 2 && data && (unsigned)i0 < (unsigned)size.p[0] && (unsigned)(i1*DataType<_Tp>::channels) < (unsigned)(size.p[1]*channels()) && ((((sizeof(size_t)<<28)|0x8442211) >> ((DataType<_Tp>::depth) & ((1 << 3) - 1))*4) & 15) == elemSize1()) in cv::Mat::at, file D:\Coding\C-C++\opencv\opencv2_4_13\build\include\opencv2/core/mat.hpp, line 548

@nladuo
Copy link
Owner

nladuo commented Apr 17, 2017

../downloader/captchas/00179352-2c1b-42c9-83c2-c88402639381.png, 图片下载是否正确?如:weibo.cn

请尽量在linux桌面环境下测试,环境搭建见:验证码破解技术四部曲之环境搭建篇(一)

@minghu6
Copy link
Contributor Author

minghu6 commented Apr 17, 2017

图片都下好了,也能被im.show正常显示

@nladuo
Copy link
Owner

nladuo commented Apr 17, 2017

那你还是在linux试把,我从来没有在windows上用过opencv。

@minghu6
Copy link
Contributor Author

minghu6 commented Apr 17, 2017

Linux下就没问题吗。。。。。。

@nladuo
Copy link
Owner

nladuo commented Apr 17, 2017

我自己在mac上和ubuntu上测试都没有问题。(表示从来没用过windows上的opencv)

@nladuo
Copy link
Owner

nladuo commented Apr 17, 2017

这个是我分割出来的数据,你可以看看,training_set.zip

@minghu6
Copy link
Contributor Author

minghu6 commented Apr 17, 2017

我看了。
事实上对于spliter,我改了一个python版本,但是不知道为什么有各种越界问题,正在debug

@nladuo
Copy link
Owner

nladuo commented Apr 17, 2017

非常支持。我分割这块的算法处理的比较生硬,欢迎提供pr。

@minghu6
Copy link
Contributor Author

minghu6 commented Apr 17, 2017

opencv算法我也是临时抱佛脚
不过clear_horizontal_noise_line 总是会有is_black x,y参数的越界
save_image也有offset_x,offset_y的负值情况,原来的版本不会出现这种情况吗?

不过这些越界相对还是少数,规避以后正常分隔是没问题的。
python版本spliter刚跑通,电脑卡得不行。。。。。果然这种事应该在别的机器上干

如果需要的话,我把spliter的Python版本也push上来看看?

@nladuo
Copy link
Owner

nladuo commented Apr 17, 2017

你放在你fork的仓库里给我看看?

@minghu6
Copy link
Contributor Author

minghu6 commented Apr 17, 2017

好的,稍等我整理一下

@mahaoyang
Copy link

题外话,为什么不使用SVHN算法,可以免分割步骤

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants