小编use*_*218的帖子

openCV AdaptiveThreshold与Otsu阈值.投资回报率

我试图使用这两种方法,但似乎自适应阈值似乎给出了更好的结果.我用了

 cvSmooth( temp, dst,CV_GAUSSIAN,9,9, 0);
Run Code Online (Sandbox Code Playgroud)

在原始图像上然后我只使用了阈值.

有没有什么我可以用Otsu方法调整,以使图像更好像自适应阈值?还有一件事,侧面有一些不需要的指纹残留,任何想法我怎么能把它们丢弃?

我从期刊上读到,通过比较自定义方块中白色像素的百分比,我可以获得投资回报率.然而,这种方法要求我有一个阈值,可以使用OTSU方法找到,但我不太确定AdaptiveThresholding.

cvAdaptiveThreshold( temp, dst, 255,CV_ADAPTIVE_THRESH_MEAN_C,CV_THRESH_BINARY,13, 1 );
Run Code Online (Sandbox Code Playgroud)

结果:

原版的自适应

cvThreshold(temp, dst, 0, 255, CV_THRESH_BINARY | CV_THRESH_OTSU);
Run Code Online (Sandbox Code Playgroud)

原版的 大津

c++ opencv roi threshold adaptive-threshold

7
推荐指数
1
解决办法
2万
查看次数

win32 内容已更改,但除非移动窗口,否则不会显示更新

我的 win32 GUI 内容每秒都会更改,但除非手动移动窗口,否则不会显示更新。我尝试每秒弹出一个消息框来触发窗口刷新并且它起作用了。因此,这证明我的内容确实发生了变化,但窗口没有更新。我希望刷新窗口而不是每次都弹出消息框,有没有这样的窗口功能?谢谢

case WM_PAINT:


RECT fingerprintSection;
fingerprintSection.left=500;
fingerprintSection.top=300;
fingerprintSection.bottom=540;
fingerprintSection.right=660;

    wmId    = LOWORD(wParam);
    hdc = BeginPaint(hWnd, &ps);

    refresh=!refresh;
    if((start==true)&&(refresh==true)&&(stop!=true))
    {       

    windowName = MultiByteStringToWideString(name1, CP_ACP);
    LoadAndBlitBitmap(windowName.c_str(), hdc,500,0);//loading a picture that doesnt change
    fingerprint();
    LoadAndBlitBitmap(TEXT("outresized.bmp"), hdc,500,300);//loading a picture that constantly change
    refresh=!refresh;

//RedrawWindow(hWnd,&fingerprintSection,NULL,RDW_INTERNALPAINT|RDW_VALIDATE|RDW_UPDATENOW|RDW_NOCHILDREN);

InvalidateRect( hWnd, &fingerprintSection, TRUE );
    }
    EndPaint(hWnd, &ps);
    break;
Run Code Online (Sandbox Code Playgroud)

c++ winapi refresh win32gui

3
推荐指数
1
解决办法
6351
查看次数

如何获取亮像素或暗像素的坐标?开放式计算机视觉

我试图从二进制图像中获取白色 n 黑色像素的坐标,以便我可以获得图像的 ROI 并更改像素值。我可以调用任何函数吗?

这是原始图像

之后,将使用 OTSU 方法对其进行阈值处理。结果:图8.7

我希望从图 8.7 中得到图 8.8 的结果(对图像感到抱歉,我已经尝试旋转它,但它仍然以这种方式显示)。有什么方法吗?

这是阈值图像链接。https://i.stack.imgur.com/zKHav.png

之后我就能获得投资回报率。

c++ opencv roi image-processing

0
推荐指数
1
解决办法
4528
查看次数

登录银行网站并通过脚本检查交易的最佳方式?

我正在尝试通过登录银行网站并检查我的交易来自动化我的业务,​​然后再将货物发送给我的客户.我正在尝试使用python来做到这一点.到目前为止,它适用于Facebook,我现在正在尝试银行网站.但我在想,如果网页发生变化,这种方法不起作用.有没有其他最佳方式来做到这一点?btw没有提供API.谢谢你的建议.这是代码

from splinter import Browser

#userid
user_email = 'username'

# takes the password for the user account needed
user_pass = 'password'

# loads the firefox broswer
browser= Browser('firefox')

#selects bank as the website to load in the browser (have to load twice  because the bank directs it to the main site for the first time)
browser.visit('https://www.cimbclicks.com.my/wps/portal/!ut/p/c0/04_SB8K8xLLM9MSSzPy8xBz9QJ_89Mw8_YJ0RUUAk9OZqw!!/')
browser.visit('https://www.cimbclicks.com.my/wps/portal/!ut/p/c0/04_SB8K8xLLM9MSSzPy8xBz9QJ_89Mw8_YJ0RUUAk9OZqw!!/')

# fills the userid
browser.fill('userid', user_email)
#still working on the password part (unfinished)
browser.fill('pass', user_pass)

#selects the login button(so far doesn't work. I'm …
Run Code Online (Sandbox Code Playgroud)

python windows web

0
推荐指数
1
解决办法
733
查看次数