我正在开发一个项目,为此我需要放大图像。
我尝试过 OpenCv 库的re size函数来调整大小。但是图像质量下降了。
假设我有 136x136 尺寸的图像,我想将其尺寸调整为 209x209 且质量相同。我该怎么做?
我的程序应该计算一个盒子的表面积和体积.我将拥有以下函数:setHeight,setWidth,setLength,getVolume,getSurfaceArea.
当我编译我的程序时,我收到以下错误消息:
boxMain.cpp: In function ‘int main()’:
boxMain.cpp:21: error: no matching function for call to 'Box::getVolume(double&, double&, double&)’
Box.hpp:20: note: candidates are: double Box::getVolume()
boxMain.cpp:23: error: no matching function for call to ‘Box::getSurfaceArea(double&, double&, double&)’
Box.hpp:21: note: candidates are: double Box::getSurfaceArea()
Run Code Online (Sandbox Code Playgroud)
根据我在此网站上的搜索,大多数答案似乎表明默认构造函数不会退出或无法正常工作.我不知道这是不是我的问题,但我根据教科书编写了我的默认构造函数的代码,所以我很难搞清楚我做错了什么.
我下面的代码中缺少的行只是我删除的描述和注释.
任何帮助,将不胜感激!非常感谢你们所有人.
这是我的.hpp文件:
#include <iostream>
#ifndef Box_HPP
#define BOX_HPP
class Box {
private:
double h, w, l;
double height, width, length;
public:
void setHeight(double h);
void setWidth(double w);
void setLength(double l);
double getVolume();
double getSurfaceArea();
Box();
};
Run Code Online (Sandbox Code Playgroud)
这是我的函数.cpp文件: …