我正在尝试模糊图像,而高光模糊图像但是当我运行我的代码时最终发生的一切都是图像打开而没有模糊.任何人都可以帮我解决这个问题吗?
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
int main() {
//read the image
cv::Mat image= cv::imread("Space_Nebula.jpg");
cv::Mat result;
// create image window
cv::namedWindow("My Image");
//display image
cv::imshow("My Image", image);
//wait key
cv::waitKey(50000);
//blur image
cv::blur(image,result,cv::Size(5,5));
cv::imshow("My Image", image);
//smooth image
cv::GaussianBlur(image,result,cv::Size(5,5),1.5);
cv::imshow("My Image", image);
return 1;
}
Run Code Online (Sandbox Code Playgroud) 有没有办法根据符号启动nmap扫描?我希望能够
在终端执行我的代码时运行nmap扫描,如下所示:script.pl -b xx.xxx.xxx.我尝试使用if语句执行此操作,但它正在运行.有谁知道hpw能做到这一点吗?
if("-b")
{
('nmap -v -r ARGS[0] >>file.txt')
}
Run Code Online (Sandbox Code Playgroud) 我正在尝试在Perl中实现一个堆栈,我有一个数组.我想推送数组上的项目,弹出项目并打印出新的数组,如下所示:"1,2,3,5,6
我怎样才能做到这一点?我的代码只是将数字6添加到数组的顶部.
#!usr/bin/perl
@array = 1..5;
push @array, 6; #Push the number 6 into the array
pop @array, 4; #Pop the number 4 out of the array
print "The array is now $array[-1].\n";
Run Code Online (Sandbox Code Playgroud)