OpenCV Common functions

Source: Internet
Author: User

1. Cvsaveimage Save image to File

  • c++ version  int cvsaveimage ( const char* filename, const CvArr* image ) ;   filename  file name.  image  the image to save.

  • Version JAVACV cvsaveimage (String filename, iplimage image); FileName File name. Image to save.

2.cvsmooth function Usage

Defining Prototypes

void Cvsmooth (const cvarr* src, cvarr* dst,int Smoothtype=cv_gaussian,
int param1, int param2, double param3, double param4);
SRC: Enter an image.
DST: Output image.
Smoothtype Smoothing Method:
Cv_blur_no_scale (simple blur without scale transformation)-sums the param1xparam2 fields of each pixel. If the neighborhood size is variable, the integral image can be computed in advance using the function cvintegral.
Cv_blur (Simple BLUR)--sum the param1xparam2 neighborhood of each pixel and do a scale transform of 1/(PARAM1XPARAM2).
Cv_gaussian (GAUSSIAN Blur)-A Gaussian convolution with a kernel size of param1xparam2 for the image.
Cv_median (MEDIAN Blur)--The median filter for the image with a kernel size of param1xparam1 (neighborhood is square).
Cv_bilateral (bidirectional filtering)-Application of bi-directional 3x3 filtering, color sigma=param1, Space sigma=param2.

3. Ascvmat (): Iplimage turn Cvmat

    • Version JAVACV:

String filename = "f:\\images\\han1.jpg"; File path

Iplimage filename=cvloadimage (filename); Loading pictures

Cvmat src =filename.ascvmat (); Iplimage Turn Cvmat





This article is from the "XJDLC" blog, make sure to keep this source http://xjdlc.blog.51cto.com/8337348/1638906

OpenCV Common functions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.