devs.visionpackage.org.cmotch.imageviewer
Class DisplayImage

java.lang.Object
  extended by java.lang.Thread
      extended by biocell.BioThread
          extended by devs.visionpackage.org.cmotch.imageviewer.DisplayImage
All Implemented Interfaces:
java.lang.Runnable

public class DisplayImage
extends BioThread

Threaded class that will capture images from a Framegrabber and process them depending on what processing is enabled


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
DisplayImage(ImagePanel ip, FrameGrabber frameGrab, PMotionCalculator pmc)
          Constructor
 
Method Summary
 int getFrameCount()
          Get the current framecount
 void resetFrameCount()
          Reset the framecount
 void run()
          Start the thread, the thread runs through and checks to see what processing is enabled and executes the processing, then sleeps for 25ms
 void setEdgeType(int edgeType)
          Set the edge type used by the edge detection processor
 void stopCapture()
          Stop the capture / display thread from running
 void toggleBlackWhite()
          Toggle the binarization image processor
 void toggleColorDetection()
          Toggle the color detection processor
 void toggleFindEdges()
          Toggle the edge detection processor on and off
 void toggleFindFullEdges()
          Toggle the full edge detection processor, this processor combinins binirization, gaussian blur and horizontal and vertical edge detection
 void toggleFindMotion()
          Toggle motion detection
 void toggleGaussianBlur()
          Toggle gaussian blur processor
 void toggleGrayScale()
          Toggle gray scale of the image
 
Methods inherited from class biocell.BioThread
getCurrentmood, getMoodParam, getstate, setMood, stepEnergy
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DisplayImage

public DisplayImage(ImagePanel ip,
                    FrameGrabber frameGrab,
                    PMotionCalculator pmc)
Constructor

Parameters:
ip - The image panel that the image will be displayed on
frameGrab - The framegrabber that will capture the images from the camera
Method Detail

stopCapture

public void stopCapture()
Stop the capture / display thread from running


setEdgeType

public void setEdgeType(int edgeType)
Set the edge type used by the edge detection processor

Parameters:
edgeType - The edgetype that the edge detection processor will use

toggleFindEdges

public void toggleFindEdges()
Toggle the edge detection processor on and off


toggleFindFullEdges

public void toggleFindFullEdges()
Toggle the full edge detection processor, this processor combinins binirization, gaussian blur and horizontal and vertical edge detection


toggleGrayScale

public void toggleGrayScale()
Toggle gray scale of the image


toggleColorDetection

public void toggleColorDetection()
Toggle the color detection processor


toggleBlackWhite

public void toggleBlackWhite()
Toggle the binarization image processor


toggleFindMotion

public void toggleFindMotion()
Toggle motion detection


toggleGaussianBlur

public void toggleGaussianBlur()
Toggle gaussian blur processor


getFrameCount

public int getFrameCount()
Get the current framecount


resetFrameCount

public void resetFrameCount()
Reset the framecount


run

public void run()
Start the thread, the thread runs through and checks to see what processing is enabled and executes the processing, then sleeps for 25ms

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread