APP_Framework/Framework/:complete ordinary mean_filter

This commit is contained in:
chunyexixiaoyu 2021-08-19 09:57:19 +08:00
parent c251937f9f
commit d16c698789
2 changed files with 17 additions and 2 deletions

View File

@ -1 +1,16 @@
#include <ordinary_mean_filter.h> #include <ordinary_mean_filter.h>
/**
* @description:
* @param {int *} hander array address
* @param {int} len array length
* @return {*}
*/
int OrdinaryMeanFilter(int * hander,int len)
{
int sum = 0;
for(int i = 0;i < len ;i++)
{
sum = sum + *(hander +i);
}
return (int)(sum/len);
}

View File

@ -1,4 +1,4 @@
#ifndef _ORDINARY_MEAN_FILTER_H #ifndef _ORDINARY_MEAN_FILTER_H
#define _ORDINARY_MEAN_FILTER_H #define _ORDINARY_MEAN_FILTER_H
int OrdinaryMeanFilter(int * hander,int len);
#endif #endif