本文整理匯總了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);
}