コード例 #1
0
void Naa2TlvConverter::process(const TRaster32P &srcRas) {
  m_valid = false;
  setSourceImage(srcRas);
  if (!m_valid) return;

  separateRegions();

  computeLinks();

  findRegionBorders();
  erodeRegions();

  findLargePaints();

  findBackgroundRegions();
  findMainInks();

  // computeMainInkThickness();
  findThinInks();

  measureThickness();

  // findPaints();
  findPaints2();

  findThinPaints();

  findSuspectInks();

  addBorderInks();
}
コード例 #2
0
void FilterEffectRenderer::prepare()
{
    // At this point the effect chain has been built, and the
    // source image sizes set. We just need to attach the graphic
    // buffer if we have not yet done so.
    if (!m_graphicsBufferAttached) {
        setSourceImage(ImageBuffer::create(IntSize(m_sourceDrawingRegion.width(), m_sourceDrawingRegion.height()), ColorSpaceDeviceRGB, renderingMode()));
        m_graphicsBufferAttached = true;
    }
    m_sourceGraphic->clearResult();
    lastEffect()->clearResult();
}
コード例 #3
0
ファイル: FilterEffectRenderer.cpp プロジェクト: jiezh/h5vcc
void FilterEffectRenderer::allocateBackingStoreIfNeeded()
{
    // At this point the effect chain has been built, and the
    // source image sizes set. We just need to attach the graphic
    // buffer if we have not yet done so.
    if (!m_graphicsBufferAttached) {
        IntSize logicalSize(m_sourceDrawingRegion.width(), m_sourceDrawingRegion.height());
        if (!sourceImage() || sourceImage()->logicalSize() != logicalSize)
            setSourceImage(ImageBuffer::create(logicalSize, 1, ColorSpaceDeviceRGB, renderingMode()));
        m_graphicsBufferAttached = true;
    }
}
コード例 #4
0
ImageSaliencyDetector::ImageSaliencyDetector(const cv::Mat1f& src) {
	if (src.empty()) {
		throw std::invalid_argument("ImageSaliencyDetector: Source image cannot be empty!");
	}

	setSourceImage(src);

	mDensityEstimates.resize(mSrcImage.rows);
	for (int i = 0; i < mSrcImage.rows; ++i) {
		mDensityEstimates[i].resize(mSrcImage.cols);
	}
}
コード例 #5
0
void FilterEffectRenderer::allocateBackingStoreIfNeeded()
{
    // At this point the effect chain has been built, and the
    // source image sizes set. We just need to attach the graphic
    // buffer if we have not yet done so.
    if (!m_graphicsBufferAttached) {
        IntSize logicalSize(m_sourceDrawingRegion.width(), m_sourceDrawingRegion.height());
        if (!sourceImage() || sourceImage()->size() != logicalSize) {
            OwnPtr<ImageBufferSurface> surface = adoptPtr(new UnacceleratedImageBufferSurface(logicalSize));
            setSourceImage(ImageBuffer::create(surface.release()));
        }
        m_graphicsBufferAttached = true;
    }
}