本文整理汇总了Java中org.openimaj.image.FImage.maxPixel方法的典型用法代码示例。如果您正苦于以下问题:Java FImage.maxPixel方法的具体用法?Java FImage.maxPixel怎么用?Java FImage.maxPixel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.openimaj.image.FImage
的用法示例。
在下文中一共展示了FImage.maxPixel方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getBestLine
import org.openimaj.image.FImage; //导入方法依赖的package包/类
/**
* Returns the top line in the given accumulator space.
* The end points of the line will have x coordinates at -2000 and 2000.
*
* @param accumulatorSpace The accumulator space to look within
* @param offset The number of bins offset from zero degrees
* @return The strongest line in the accumulator space
*/
public Line2d getBestLine( FImage accumulatorSpace, int offset )
{
FValuePixel p = accumulatorSpace.maxPixel();
// Remember accumulator space is r,theta
int theta = p.x + offset;
int dist = p.y;
return getLineFromParams( theta, dist, -2000, 2000 );
}
示例2: getBestLines
import org.openimaj.image.FImage; //导入方法依赖的package包/类
/**
* Returns the top n lines from the given accumulator space.
* The end points of the lines will have x coordinates at -2000 and 2000.
*
* @param n The number of lines to return
* @param accumulatorSpace The space to look within
* @param offset The offset into the accumulator of 0 in this space
* @return A list of lines
*/
public List<Line2d> getBestLines( int n, FImage accumulatorSpace, int offset )
{
FImage accum2 = accumulatorSpace.clone();
List<Line2d> lines = new ArrayList<Line2d>();
for( int i = 0; i < n; i++ )
{
FValuePixel p = accum2.maxPixel();
lines.add( getLineFromParams( p.x+offset, p.y, -2000, 2000 ) );
accum2.setPixel( p.x, p.y, 0f );
}
return lines;
}