我正在寻找一个网站从中下载haar cascades xml文件.它可以用于任何对象,只要它是正常工作的级联.
有谁知道OpenCV和Python上是否有任何书籍?
我有OReilly学习OpenCV的书,但它的C语言,所以我正在寻找书籍/ pdfs /在线教程,特别是Python和OpenCV.
我看过http://www.neuroforge.co.uk/index.php/getting-started-with-python-a-opencv是有帮助的,但我更喜欢有一本书可供使用.
我正在创建一个照片查看器,用户可以使用它来标记Facebook中的图像.单击图像进行标记后,我使用wx.GetMousePosition查找鼠标在图像上单击的位置.然后创建用户已标记图像的wx.MemoryDC,以便我可以绘制标记在图像上使用dc.DrawRectangle.
下面是绘制到图像上的代码:顺便说一下,我正在使用wxPython
W=495 #Position of mouse (y)
H=205 #Position of mouse (x)
dc = wx.MemoryDC()
dc.SelectObject(bitImg)#name of bitmap image
dc.SetPen(wx.Pen('#FF0000'))
#dc.SetBrush(wx.Brush('#aaffff'))
dc.SetBrush(wx.TRANSPARENT_BRUSH)
dc.DrawRectangle(W, H, 20, 20)# Drawing the rectangle using the W and H
# for the position
dc.SelectObject(wx.NullBitmap)
Run Code Online (Sandbox Code Playgroud)
前两行是我从wx.GetMousePosition收到的X和Y坐标.这是标签在其中一个图像上的位置.然而,当我绘制矩形时,这些点W和H在图像上不显示,因为它们太大而不显示在屏幕上.如果我将W和H都设置为90,它将在图像上绘制一个小方块.
那么我如何转换这些wx.GetMousePosition坐标以便它们适合'dc'?关于获得鼠标坐标的任何其他建议?
我如何使用wx.ProgressDialog
时间调用我的方法imgSearch
?该imgSearch
方法在用户的PC上查找图像文件.如何wx.ProgressDialog
在imgSearch
仍在运行时进行运行并显示需要多长时间imgSearch
?
这是我的代码:
def onFind (self,event)# triggered by a button click
max = 80
dlg = wx.ProgressDialog("Progress dialog example","An informative message",parent=self, style = wx.PD_CAN_ABORT| wx.PD_APP_MODAL| wx.PD_ELAPSED_TIME| wx.PD_REMAINING_TIME)
keepGoing = True
count = 0
imageExtentions = ['*.jpg', '*.jpeg', '*.png', '*.tif', '*.tiff']
selectedDir = 'C:\\'
imgSearch.findImages(imageExtentions, selectedDir)# my method
while keepGoing and count < max:
count += 1
wx.MilliSleep(250)
if count >= max / 2:
(keepGoing, skip) = dlg.Update(count, "Half-time!")
else: …
Run Code Online (Sandbox Code Playgroud) 任何人都可以指导我阅读有关PageRank和Term Frequency - Inverse Document Frequency的比较的任何学术论文.我一直在寻找,我只是找到两者结合的论文.
我需要找到Page Rank相对于TF-IDF的优势
我正在寻找OpenCV 2.4 C++中的chamferMatching方法的文档./OpenCV-2.4.0/samples/cpp/chamfer.cpp中给出的OpenCV实现仅使用前四个参数.共有14个参数可以设置,包括:
参数:
img (Cv::Mat)
templ (Cv::Mat)
results (Std::Vector::Std_Vector_Cv_Point)
cost (Std::Vector::Float)
templ_scale (Double) (defaults to: 1)
max_matches (Fixnum) (defaults to: 20)
min_match_distance (Double) (defaults to: 1.0)
pad_x (Fixnum) (defaults to: 3)
pad_y (Fixnum) (defaults to: 3)
scales (Fixnum) (defaults to: 5)
min_scale (Double) (defaults to: 0.6)
max_scale (Double) (defaults to: 1.6)
orientation_weight (Double) (defaults to: 0.5)
truncate (Double) (defaults to: 20)
Run Code Online (Sandbox Code Playgroud)
如果有人可以指出我解释每个参数的示例或文档,我将非常感激.