public class LaserTracker extends AbstractImageProcessor
This processor provides a very simple strategy for detecting laser pointers
in an image. It simply looks for small, very bright areas. If the
laserImage property is set, a track of the identified
laser-points is produced.
| Modifier and Type | Field and Description |
|---|---|
protected InetAddress |
addr |
protected String |
address |
protected int |
evalMagic |
protected Point[] |
fPoints |
protected int |
frame |
protected int |
initialMagic |
protected Point |
initialPoint |
protected int |
initialRGB |
protected String |
laserImage |
protected ImageRGB |
lastImage |
protected String |
output |
protected DatagramPacket |
packet |
protected int |
port |
protected int |
searchSize |
protected boolean |
skipWithoutPoint |
protected DatagramSocket |
socket |
protected int |
threshold |
imageKey| Constructor and Description |
|---|
LaserTracker() |
| Modifier and Type | Method and Description |
|---|---|
double |
dist(Point p,
Point q) |
String |
getAddress() |
String |
getLaserImage() |
String |
getOutput() |
int |
getPort() |
int |
getSearchSize() |
int |
getThreshold() |
void |
init(stream.ProcessContext ctx) |
boolean |
isSkipWithoutPoint() |
stream.Data |
process(stream.Data item,
ImageRGB img) |
void |
setAddress(String address) |
void |
setLaserImage(String laserImage) |
void |
setOutput(String output) |
void |
setPort(int port) |
void |
setSearchSize(int searchSize) |
void |
setSkipWithoutPoint(boolean skipWithoutPoint) |
void |
setThreshold(int threshold) |
getImage, process, setImageprotected String laserImage
protected ImageRGB lastImage
protected Point initialPoint
protected int initialRGB
protected int searchSize
protected int threshold
protected int frame
protected String output
protected boolean skipWithoutPoint
protected DatagramSocket socket
protected String address
protected int port
protected InetAddress addr
protected DatagramPacket packet
protected int evalMagic
protected int initialMagic
protected Point[] fPoints
public int getThreshold()
public void setThreshold(int threshold)
threshold - the threshold to setpublic int getSearchSize()
public void setSearchSize(int searchSize)
public String getLaserImage()
public void setLaserImage(String laserImage)
laserImage - the laserImage to setpublic String getOutput()
public void setOutput(String output)
output - the output to setpublic boolean isSkipWithoutPoint()
public void setSkipWithoutPoint(boolean skipWithoutPoint)
skipWithoutPoint - the skipWithoutPoint to setpublic String getAddress()
public void setAddress(String address)
address - the address to setpublic int getPort()
public void setPort(int port)
port - the port to setpublic void init(stream.ProcessContext ctx)
throws Exception
init in interface stream.StatefulProcessorinit in class stream.AbstractProcessorExceptionAbstractProcessor.init(stream.ProcessContext)public stream.Data process(stream.Data item,
ImageRGB img)
process in class AbstractImageProcessorAbstractImageProcessor.process(stream.Data,
stream.image.ImageRGB)Copyright © 2013. All Rights Reserved.