• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ resizeImage函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中resizeImage函数的典型用法代码示例。如果您正苦于以下问题:C++ resizeImage函数的具体用法?C++ resizeImage怎么用?C++ resizeImage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了resizeImage函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: resizeImage

void ImageView::setZoom (bool zoomFit, double factor)
{
    m_zoomFit = zoomFit;
    m_zoomFactor = factor;

    resizeImage();

    update();
}
开发者ID:manmetplok,项目名称:zoom-tools,代码行数:9,代码来源:imageview.cpp


示例2: qMax

void DrawingBoard::resizeEvent(QResizeEvent * event){
  if (width() > image.width() || height() > image.height()){
    int newWidth = qMax(width() + 128, image.width());
    int newHeight = qMax(height() + 128, image.height());
    resizeImage(&image, QSize(newWidth, newHeight));
    update();
  }
  QWidget::resizeEvent(event);
}
开发者ID:kl0211,项目名称:Aristotle,代码行数:9,代码来源:drawingarea.cpp


示例3: resizeImage

bool DrawArea::saveImage(const QString& fileName, const QString& fileFormat) {
    QImage visibleImage = mImage;
    resizeImage(&visibleImage, this->size());

    if (visibleImage.save(fileName, fileFormat.toLatin1())) {
        mModified = false;
        return true;
    } else
        return false;
}
开发者ID:messi1,项目名称:qmlscribble,代码行数:10,代码来源:drawarea.cpp


示例4: MRI

	MRI(char const *inputFileName, VolumeType::SpacingType spacing, VolumeType::SizeType size, double initialResizeFactor):
	  resamplerSpacing(spacing),
	  resamplerSize(size) {
		readFile(inputFileName);
		rescaleIntensity();
		resizeImage(initialResizeFactor);
		buildOriginalMaskVolume();
    initialiseFilters();
    buildSlices();
    buildMaskSlices();
	}
开发者ID:mattgibb,项目名称:registration,代码行数:11,代码来源:MRI.hpp


示例5: setMinimumSize

void
RemapImage::setZoom(float z)
{
  setMinimumSize(QSize(m_imgWidth, m_imgHeight));

  m_zoom = qMax(0.01f, z);
  resizeImage();
  update();

  emit zoomChanged();
}
开发者ID:TheProjecter,项目名称:drishtislicer,代码行数:11,代码来源:remapimage.cpp


示例6: resizeImage

void Canvas::resizeEvent(QResizeEvent *event)
{
    QSize newSize = event->size();
    if (newSize.height()>image.height()||
            newSize.width()>image.width()) {
        layers.resizeLayers(newSize);
        resizeImage(&image, newSize);
        update();
    }
    QWidget::resizeEvent(event);
}
开发者ID:pm19960106,项目名称:painttyWidget,代码行数:11,代码来源:canvas.cpp


示例7: qMax

void ScribbleArea::resizeEvent(QResizeEvent *event)
{
    if (width() > image.width() || height() > image.height()) {
        int newWidth = qMax(width() , image.width());
        int newHeight = qMax(height() , image.height());
        resizeImage(&image, QSize(newWidth, newHeight));
        update();
    }

    QWidget::resizeEvent(event);
}
开发者ID:Camelek,项目名称:qtmoko,代码行数:11,代码来源:scribblearea.cpp


示例8: qDebug

void ComplexPlotter::paintEvent(QPaintEvent *e) {
  if(mRepaintEnabled) {
    qDebug() << "The image computation took " << mStopwatch->elapsed() << " milliseconds";
    mStopwatch->invalidate();
    resizeImage();
    Plotter::paintEvent(e);
    mLabel->setPixmap(QPixmap::fromImage(*mP.mImage));
    setEnabledThreadStuff(true);
    mRepaintEnabled = false;
  }
}
开发者ID:trent2,项目名称:MathTools,代码行数:11,代码来源:ComplexPlotter.cpp


示例9: resizeImage

bool Canvas::openImage(const QString &fileName)
{
    QImage loadedImage;
    if (!loadedImage.load(fileName))return false;
    QSize newSize = loadedImage.size().expandedTo(size());
    resizeImage(&loadedImage, newSize);
    image = loadedImage;
    modified = false;
    update();
    return true;
}
开发者ID:celalcakiroglu,项目名称:Qt,代码行数:11,代码来源:canvas.cpp


示例10: YUVtoGray

///
///Private methods
///
void Worker::transformImages(int n,const RoboCompCameraBus::Format& format,RoboCompCameraBus::Image &image)
{
	uint8_t *temp;
	RoboCompCameraBus::Format ftemp;
	ftemp.width = busparams.width;
	ftemp.height = busparams.height;
	ftemp.modeImage = format.modeImage;
	if(format.modeImage != RoboCompCameraBus::YUV422)
	{
		if(format.modeImage == RoboCompCameraBus::GRAY8)
			YUVtoGray(ftemp.width,ftemp.height,pSour,pDes,n);
		else
		{
			if(format.modeImage == RoboCompCameraBus::RGB888Packet)
				YUVtoRGB(ftemp.width,ftemp.height, pSour, pDes,n);
			else
			{
				if(format.modeImage == RoboCompCameraBus::RGB888Planar)
					YUVtoRGBPtr(ftemp.width,ftemp.height,pSour,pDes,n);
			}
		}
		for(int i=0;i<n;i++)
		{
			temp = pSour[i];
			pSour[i] = pDes[i];
			pDes[i] = temp;
		}
	}
	if (ftemp.width != format.width or ftemp.height != format.height)
	{
		resizeImage(ftemp,pSour,format,pDes,n);
		for(int i=0;i<n;i++)
		{
			temp = pSour[i];
			pSour[i] = pDes[i];
			pDes[i] = temp;
		}
	}
	for(int i=0;i<n;i++)	
	{
		if(cameraParamsList[i].invertedH != false or cameraParamsList[i].invertedV != false)
			mirror(format,pSour[i],cameraParamsList[i].invertedH,cameraParamsList[i].invertedV);
	}
	
	int size = format.width*format.height;
	if (format.modeImage == RoboCompCameraBus::RGB888Packet or format.modeImage == RoboCompCameraBus::RGB888Planar)
		size *= 3;
	if (format.modeImage == RoboCompCameraBus::YUV422)
		size *= 2;

	image.timeStamp = reloj.elapsed();
	image.frmt = format;
	image.frmt.size = size;
}
开发者ID:robocomp,项目名称:robocomp-robolab-deprecated,代码行数:57,代码来源:worker.cpp


示例11: resizeImage

bool DrawingBoard::saveImage(const QString &fileName, const char *fileFormat)
{
    QImage imageOnBoard = image;
    resizeImage(&imageOnBoard, size());

    if (imageOnBoard.save(fileName, fileFormat)) {
        isChanged = false;
        return true;
    } else {
        return false;
    }
}
开发者ID:wiperz1789,项目名称:Drawing-Board,代码行数:12,代码来源:drawingboard.cpp


示例12: resizeImage

bool PaintWidget::saveImage(const QString fileName, const char *fileFormat)
{
    QImage visibleImg = image;
    resizeImage(&visibleImg, size());

    if (visibleImg.save(fileName, fileFormat))
    {
        modified = false;
        return true;
    } else
        return false;
}
开发者ID:Inen,项目名称:MyPaint,代码行数:12,代码来源:paintwidget.cpp


示例13: qMax

void PaintCanvas::resizeEvent(QResizeEvent *event)
{
//    if (width() > image.width() || height() > image.height()) {
        //Earlier they wanted a safe margine that the image would draw outside of hence the Qmax
        int newWidth = qMax(width() + 0, image.width());
        int newHeight = qMax(height() + 0, image.height());
        std::cout<<"RESIZEDEVENT  "<<newHeight<<std::endl;

        resizeImage(&image, QSize(newWidth, newHeight));
        update();
//    }
    QWidget::resizeEvent(event);
}
开发者ID:biotracking,项目名称:biotrack,代码行数:13,代码来源:paintcanvas.cpp


示例14: setEnabledThreadStuff

void ComplexPlotter::doRepaint() {
  setEnabledThreadStuff(false);
  mRepaintEnabled = true;

  resizeImage();
  // call through to the superclass handler
  mStopwatch->start();
  for(int i=mP.mNThreads-1; i>=0; i--)
    // paintThreads[i]->setPlotter(this);
    paintThreads[i]->render(mP, computeCSParameters(mLabel), xMin(), yMin());

  qDebug() << "started " << mP.mNThreads << " threads.";
}
开发者ID:trent2,项目名称:MathTools,代码行数:13,代码来源:ComplexPlotter.cpp


示例15: resizeImage

//! [3]
bool ScribbleArea::saveImage(const QString &fileName, const char *fileFormat)
//! [3] //! [4]
{
    QImage visibleImage = image;
    resizeImage(&visibleImage, size());

    if (visibleImage.save(fileName, fileFormat)) {
        modified = false;
        return true;
    } else {
        return false;
    }
}
开发者ID:Kwangsub,项目名称:qt-openwebos,代码行数:14,代码来源:scribblearea.cpp


示例16: qMax

//! [15]
void RotoCanvas::resizeEvent(QResizeEvent *event)
//! [15] //! [16]
{
    if (width() > panelImage.width() || height() > panelImage.height()) {
        int newWidth = qMax(width() + 128, panelImage.width());
        int newHeight = qMax(height() + 128, panelImage.height());
        resizeImage(&panelImage, QSize(newWidth, newHeight));
        QPainter painter(&panelImage);
        painter.drawImage(QPoint(0,0), originalImage);
        update();
    }
    QWidget::resizeEvent(event);
}
开发者ID:expertmm,项目名称:RotoCanvasPaint,代码行数:14,代码来源:rotocanvas.cpp


示例17: resizeImage

void PreProcessing::ImageFrameProcessingLogic()
{
	// convert input frame to RGB24 format
	ColorConversion::convertFrameToRGB24();

	// convert RGB frame to byte array
	ColorConversion::convertRGB24ToByteArray();

	// Call some OpenCL Kernel Call
	//cl_tmain();

	// Resize Image using openCV
	resizeImage();

	// get image features
	features = CNTKEvaluator::getFeatures(featureImageHeight, featureImageWidth);
}
开发者ID:ooeygui,项目名称:holobot,代码行数:17,代码来源:PreProcessing.cpp


示例18: resizeImage

void
RemapImage::setImage(QImage img, int wd, int ht)
{
  m_image = img;

  if (m_image.format() == QImage::Format_Indexed8)
    m_image.setColorTable(m_colorMap);  

  m_imgHeight = ht;    
  m_imgWidth = wd;
//  m_imgHeight = m_image.height();
//  m_imgWidth = m_image.width();

  resizeImage();

  update();
}
开发者ID:TheProjecter,项目名称:drishtislicer,代码行数:17,代码来源:remapimage.cpp


示例19: resizeImage

bool ScribbleArea::openImage(const QString &fileName)
{
    QImage loadedImage;
    if (!loadedImage.load(fileName))
        return false;

    QSize newSize = loadedImage.size().expandedTo(size());
    resizeImage(&loadedImage, newSize);
    image = loadedImage;
    modified = false;
    selected = false;
    update();

    imageHistory.clear();
    imageHistory.append(image);
    idxHistory = 0;

    return true;
}
开发者ID:plesry,项目名称:nmlab-scribble,代码行数:19,代码来源:scribblearea.cpp


示例20: letterRecognition

std::string letterRecognition(cv::Mat image){
	std::string letters[27] = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "*" };
	cv::Mat imgDivide = image.clone();
	imgDivide = removeNoise(image);
	imgDivide = resizeImage(imgDivide);
	int letterInt = compareHistograms(imgDivide);
	//make sure its an M or an N
	if (letterInt == 13 && image.cols >= 55){
		return "M";
	}
	else if (letterInt == 12 && image.cols < 55){
		return "N";
	}
	if (letterInt == 1337)
	{
		return "Error";
	}
	return letters[letterInt];
}
开发者ID:ganato,项目名称:Scrabbleizer,代码行数:19,代码来源:letterRecogition.cpp



注:本文中的resizeImage函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ resizeString函数代码示例发布时间:2022-05-30
下一篇:
C++ resizeColumnToContents函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap