本文整理汇总了Java中org.openimaj.image.processing.convolution.FImageGradients.gradientMagnitudesAndQuantisedOrientations方法的典型用法代码示例。如果您正苦于以下问题:Java FImageGradients.gradientMagnitudesAndQuantisedOrientations方法的具体用法?Java FImageGradients.gradientMagnitudesAndQuantisedOrientations怎么用?Java FImageGradients.gradientMagnitudesAndQuantisedOrientations使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.openimaj.image.processing.convolution.FImageGradients
的用法示例。
在下文中一共展示了FImageGradients.gradientMagnitudesAndQuantisedOrientations方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setup
import org.openimaj.image.processing.convolution.FImageGradients; //导入方法依赖的package包/类
/**
* Setup tests
*
* @throws IOException
*/
@Before
public void setup() throws IOException {
image = ImageUtilities.readF(OpenIMAJ.getLogoAsStream());
final Mode mode = FImageGradients.Mode.Unsigned;
final FImage[] interpMags = new FImage[9];
final FImage[] mags = new FImage[9];
for (int i = 0; i < 9; i++) {
interpMags[i] = new FImage(image.width, image.height);
mags[i] = new FImage(image.width, image.height);
}
FImageGradients.gradientMagnitudesAndQuantisedOrientations(image, interpMags, true, mode);
FImageGradients.gradientMagnitudesAndQuantisedOrientations(image, mags, false, mode);
satInterp = new SATWindowedExtractor(interpMags);
sat = new SATWindowedExtractor(mags);
gradMags = FImageGradients.getGradientMagnitudesAndOrientations(image, mode);
binnedInterp = new InterpolatedBinnedWindowedExtractor(9, mode.minAngle(), mode.maxAngle(), true);
binned = new BinnedWindowedExtractor(9, mode.minAngle(), mode.maxAngle());
gradMags.orientations.analyseWith(binnedInterp);
gradMags.orientations.analyseWith(binned);
}
示例2: analyseImage
import org.openimaj.image.processing.convolution.FImageGradients; //导入方法依赖的package包/类
@Override
public void analyseImage(FImage image, Rectangle bounds) {
if (data == null)
data = new WorkingData();
data.boundMinX = (int) bounds.x;
data.boundMaxX = (int) (bounds.width - 1);
data.boundMinY = (int) bounds.y;
data.boundMaxY = (int) (bounds.height - 1);
data.setupWorkingSpace(image, this);
FImageGradients.gradientMagnitudesAndQuantisedOrientations(image, data.gradientMagnitudes);
extractFeatures();
normaliseDescriptors();
}
示例3: analyseImage
import org.openimaj.image.processing.convolution.FImageGradients; //导入方法依赖的package包/类
@Override
public void analyseImage(FImage image) {
final FImage[] magnitudes = new FImage[nbins];
for (int i = 0; i < nbins; i++)
magnitudes[i] = new FImage(image.width, image.height);
FImageGradients.gradientMagnitudesAndQuantisedOrientations(image, magnitudes, histogramInterpolation,
orientationMode);
computeSATs(magnitudes);
}