Exemplo n.º 1
0
 def _ensurewindow(self, name, foreground=False):
     if not (self.stopping or hg.cvGetWindowHandle(name)):
         # First image, or window closed manually - open window
         hg.cvNamedWindow(name)
         # Bring to front same as if the foreground thread had created it
         if foreground:
             windll.user32.SetForegroundWindow(hg.cvGetWindowHandle(name))
         self._have_windows = True
Exemplo n.º 2
0
    def display(self, index=-1):
        """
        open a new window
        """
        if(index==-1):
            self.maxWindow = self.maxWindow+1;
            index= self.maxWindow;

        if(index > self.maxWindow):
            self.maxWindow = index;

        self.currentWindow = index;
        self.currentWindowName = "opencv-python window %d" % self.currentWindow
        cvNamedWindow(self.currentWindowName,0)
        return self.currentWindow
Exemplo n.º 3
0
    def display(self, index=-1):
        """
        open a new window
        """
        if (index == -1):
            self.maxWindow = self.maxWindow + 1
            index = self.maxWindow

        if (index > self.maxWindow):
            self.maxWindow = index

        self.currentWindow = index
        self.currentWindowName = "opencv-python window %d" % self.currentWindow
        cvNamedWindow(self.currentWindowName, 0)
        return self.currentWindow
Exemplo n.º 4
0
import sys
import cv
import highgui

filename="../resources/test.tiff"
print " Loading \"", filename, "\""
im = highgui.cvLoadImage(filename);
highgui.cvNamedWindow("Window", 1);
highgui.cvShowImage("Window", im);
highgui.cvWaitKey();