登录
首页 » python » python hog 特征提取

python hog 特征提取

于 2022-04-02 发布 文件大小:1.42 kB
0 111
下载积分: 2 下载次数: 1

代码说明:

import cv2 import numpy as np import math import matplotlib.pyplot as plt class Hog_descriptor(): def __init__(self, img, cell_size=16, bin_size=8): self.img = img self.img = np.sqrt(img / np.max(img)) self.img = img * 255 self.cell_size = cell_size self.bin_size = bin_size self.angle_unit = 360 / self.bin_size # assert type(self.bin_size) == int, "bin_size should be integer," # assert type(self.cell_size) == int, "cell_size should be integer," # assert type(self.angle_unit) == int, "bin_size should be divisible by 360" def extract(self): height, width = self.img.shape gradient_magnitude, gradient_angle = self.global_gradient() gradient_magnitude = abs(gradient_magnitude) cell_gradient_vector = np.zeros((int(height / self.cell_size), int(width / self.cell_size), self.bin_size)) for i in rang

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • cmod5n
    cmod5 python code has been used in python to find out wind speed
    2020-11-25 15:49:32下载
    积分:1
  • Archive
    说明:  PCA 数据降维 PTYTHON 数据分析/挖掘(PCA dimensionality reduction data mining/analysis)
    2020-06-21 15:40:02下载
    积分:1
  • 机器学习课程源代码
    说明:  斯坦福大学吴恩达机器学习视频课程的源代码(Source Code for Stanford University Wu Enda Machine Learning Video Course)
    2019-03-27 17:21:29下载
    积分:1
  • 1
    说明:  Code to use the microsoft vision api along with custom images taken from a camera using python. (1/3)
    2019-03-29 21:35:50下载
    积分:1
  • main9
    用于钢筋混凝土结构构件在Opensees中的模拟(INF simulation of RC columns in Opensees)
    2017-08-23 16:43:49下载
    积分:1
  • Sublime
    说明:  python编辑器很好用,希望能够给大家带来帮助,谢谢大家!(python sublime text 3)
    2020-06-22 20:40:01下载
    积分:1
  • Python鲍鱼年龄预测
    在鲍鱼性别、长度、干重等因素下对鲍鱼年龄预测。适合初学者
    2022-02-05 19:01:01下载
    积分:1
  • Python for Data Analysis, 2nd Edition
    Python for Data Analysis DATA WRANGLING WITH PANDAS, NUMPY, AND IPYTHON
    2018-09-15 23:03:37下载
    积分:1
  • python-knn
    主要利用Python软件,利用KNN算法对垃圾邮件进行分类(This paper mainly uses Python software to classify spam mail by using KNN algorithm)
    2017-11-10 15:46:56下载
    积分:1
  • theTippingProblem
    模糊控制示例程序,以小费问题为例。采用scikit lib,有详细注释,适合初学者。(Solving the tipping problem by fuzzy control system.)
    2017-12-03 22:10:49下载
    积分:1
  • 696518资源总数
  • 105665会员总数
  • 6今日下载