- 博客(13)
- 收藏
- 关注
原创 Python实现PDF合并
一、单个函数1、str_to_int()函数:将input()输入的字符串转化为intdef str_to_int(str): ''' Convert string to int param:: "str": string return:: "x":int ''' str1 = re.sub(' ','',str) print(str1) assert str1.isdigit(),"Please input the current i
2022-05-30 16:13:05
570
原创 Python实现重复播放音频的一段
一、代码实现import datetimeimport osfrom time import sleep, timefrom pydub import AudioSegmentfrom winsound import PlaySoundfrom transformers import FlaxCLIPPreTrainedModeldef convert_t(htime): return htime.hour*3600+htime.minute*60+htime.secondde
2022-05-13 12:26:56
652
原创 C语言Socket网络通信基础一
一、客户端代码#include <winsock2.h>#include <stdio.h>#include<conio.h>#include<stdlib.h>#pragma comment(lib,"ws2_32.lib")char receiveBuf[1024];char sendBuf[1024];int main(){ int err; WORD versionRequired; WSADATA wsaDa
2022-05-09 21:15:25
598
1
原创 高斯混合模型
高斯混合模型一维应用一、代码import numpy as npimport matplotlib.pyplot as plt from math import epi = 3.1415926535def Gaussian_distribution(u,v,x): #正态分布密度函数 y = 1 / (v * pow(2*pi, 0.5))*np.exp(-((x-u)**2)/(2*v**2)) # 概率密度函数公式 return yu1 = 1u2 = 2x1
2021-11-24 10:05:48
995
原创 仿射变换函数
一、仿射变换将原图像通过平移、旋转和放缩变换成目的图像二、程序原理[x′y′]=R[xy]+[txty]\begin{bmatrix} x^{\prime} \\ y^{\prime}\end{bmatrix} =R\begin{bmatrix} x \\ y\end{bmatrix} + \begin{bmatrix} t_x \\ t_y\end{bmatrix}[x′y′]=R[xy]+[txty]其中,R为仿射矩阵表示旋转和放缩,t
2021-09-14 19:12:40
323
原创 canny算法:边界检测算法C++代码
一、算法原理canny边缘检测算法原理二、程序分块介绍1、高斯模糊。float GasArray[9]= {0.0751,0.1238,0.0571,0.1238,0.2043,0.1238,0.0751,0.1238,0.0751};\\高斯模糊算子两个矩阵的卷积(未采用傅里叶变换)float *Array_Cov_f_f_f(float *input,int input_x,int input_y,float *cov,int cov_x,int cov_y){ if(inp
2021-09-07 18:11:17
1014
原创 人脸识别3.1.1
根据人脸分类器检测人脸一、代码#include <iostream>#include <opencv2/opencv.hpp>#define N_BINS 16 //Number of bins#define N_DIVS 3 //Number of cells = N_DIVS*N_DIVS#define N_PHOG N_DIVS*N_DIVS*N_BINS#define BIN_RANGE (2*CV_PI)/N_BINS
2021-06-23 14:31:18
108
原创 人脸识别2.2.2
为建立人脸分类器得到数据一、代码#include <iostream>#include<opencv2/opencv.hpp>#include<sys/stat.h>using namespace cv;using namespace std;const char TF[]="D:\\code\\c\\opencv\\opencv_face_catch\\sample\\main.txt"; //控制文件const string SF="D:
2021-06-18 14:51:10
55
原创 人脸识别2.2.1
人脸分类一、代码#include <iostream>#include <opencv2/opencv.hpp>#define N_BINS 16 //Number of bins#define N_DIVS 3 //Number of cells = N_DIVS*N_DIVS#define N_PHOG N_DIVS*N_DIVS*N_BINS#define BIN_RANGE (2*CV_PI)/N_BINS#defin
2021-06-18 11:01:48
80
原创 人脸识别2.1.1
照片人脸特征点手动提取数据程序一、代码#include<opencv2/opencv.hpp>#include<iostream>#define SFN 10using namespace std;using namespace cv;const string SF="D:\\code\\c\\opencv\\opencv_face_detection_database\\sample\\";const string SOutput="D:\\code\\c\\
2021-06-17 16:37:46
81
原创 Opencv开发1——拼图游戏
一、代码#include<opencv2/opencv.hpp>#include<iostream>#include<stdlib.h>#include<time.h>#define PL 800#define PW 600#define EAZY 50using namespace std;using namespace cv;const Size Dsize = Size (PL,PW);const Size dsize =
2021-06-17 12:18:38
226
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人