S
- the data type used for storing votes, usually IntType, but possibly LongType or even DoubleType.T
- the data type of the input image.public abstract class HoughTransform<S extends RealType<S>,T extends Type<T> & Comparable<T>> extends Object implements OutputAlgorithm<S>, Benchmark
Modifier and Type | Field and Description |
---|---|
protected long |
pTime |
Modifier | Constructor and Description |
---|---|
protected |
HoughTransform(Image<T> inputImage,
int[] voteSize,
ImageFactory<S> voteFactory)
Constructor for a HoughTransform with a specific ImageFactory.
|
protected |
HoughTransform(Image<T> inputImage,
int[] voteSize,
S type)
Constructor for a HoughTransform using an ArrayContainerFactory to back the ImageFactory
used to generate the voteSpace image.
|
Modifier and Type | Method and Description |
---|---|
boolean |
checkInput() |
String |
getErrorMessage() |
Image<T> |
getImage() |
ArrayList<int[]> |
getPeakList()
Returns an ArrayList of int arrays, representing the positions in the vote space
that correspond to peaks.
|
long |
getProcessingTime() |
Image<S> |
getResult() |
protected boolean |
pickPeaks()
Pick vote space peaks with a
PickImagePeaks . |
protected boolean |
placeVote(int[] loc)
Place a vote of value 1.
|
protected boolean |
placeVote(int[] loc,
S vote)
Place a vote with a specific value.
|
protected void |
setErrorMsg(String msg) |
boolean |
setExclusion(double[] newExclusion) |
protected HoughTransform(Image<T> inputImage, int[] voteSize, S type)
inputImage
- the image for the HoughTransform to operate overvoteSize
- and integer array indicating the size of the voteSpace. This is passed
directly into ImageFactory to create a voteSpace image.type
- the Type to use for generating the voteSpace image.protected HoughTransform(Image<T> inputImage, int[] voteSize, ImageFactory<S> voteFactory)
inputImage
- the image for the HoughTransform to operate overvoteSize
- and integer array indicating the size of the voteSpace. This is passed
directly into ImageFactory to create a voteSpace image.voteFactory
- the ImageFactory used to generate the voteSpace image.protected boolean placeVote(int[] loc, S vote)
loc
- the integer array indicating the location where the vote is to be placed in
voteSpace.vote
- the value of the voteprotected boolean placeVote(int[] loc)
loc
- the integer array indicating the location where the vote is to be placed in
voteSpace.public ArrayList<int[]> getPeakList()
public boolean setExclusion(double[] newExclusion)
protected void setErrorMsg(String msg)
protected boolean pickPeaks()
PickImagePeaks
.public boolean checkInput()
checkInput
in interface Algorithm
public String getErrorMessage()
getErrorMessage
in interface Algorithm
public long getProcessingTime()
getProcessingTime
in interface Benchmark
Copyright © 2015–2021 Fiji. All rights reserved.