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(); }
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(); }
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; } }
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); } }
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; } }