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

python hog 特征提取

于 2022-04-02 发布 文件大小:1.42 kB
0 130
下载积分: 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 个回复

  • homtools0.9
    RVE均匀化边界条件,ABAQUS插件,可通过插件对复合材料单胞进行边界条件约束,得到有效弹性常数。(RVE homogenizes boundary conditions)
    2018-12-26 15:53:15下载
    积分:1
  • cnn图像分类
    基于Tensorflow下的cnn卷积神经网络实现图像的分类(Image classification CNN convolutional neural network based on Tensorflow)
    2018-03-28 11:12:59下载
    积分:1
  • CMAPSS Segmentation
    说明:  python code for cmapss segmentation
    2019-02-18 03:29:38下载
    积分:1
  • 1
    说明:  使用LSTM预测交通流,并与其它算法进行比较,里面包含详细程序,第一部分(LSTM is used to predict traffic flow and compared with other algorithms, which contains detailed procedures.)
    2019-01-03 09:08:15下载
    积分:1
  • 代码
    说明:  给定包含多个球员能力值的数据集,使用支撑向量机回归和BP神经网络实现对测试集预测(Given a data set containing multiple player ability values, support vector machine regression and BP neural network are used to predict the test set)
    2021-04-23 22:29:56下载
    积分:1
  • Broad-Learning-System-master
    宽度学习python实现,有关增加映射节点、增强节点的宽度模型以及增加数据的训练模型实现(Broad-Learning System By Python)
    2020-12-21 21:59:08下载
    积分:1
  • 直方图均衡化
    在VS2013+openCV平台运行,只要对图像进行均衡化,像素均衡,零度均衡,试图像像素分布均匀,使图像更加清晰,细节突出
    2022-01-30 12:19:39下载
    积分:1
  • 错题1
    说明:  PYTHON易错题;二级PYTHON易错题;PYTHON易错题;PYTHON易错题(PYTHON is prone to errors, PYTHON is prone to errors , PYTHON is prone to errors,PYTHON is prone to errors.)
    2020-06-15 22:25:02下载
    积分:1
  • Autoencoders-movie-recommender-system-master
    说明:  这里运用了深度网络结构自编码器进行电影维度特征编码,资料中包含电影数据movielens(Here, a deep network structure auto-encoder is used to encode the feature of movie dimension. The data contains movie movielens)
    2020-06-19 23:34:22下载
    积分:1
  • PythonStandardLibrary
    python standard library 中文版,非常有用(Chinese version of python standard library is very useful)
    2010-11-08 20:40:52下载
    积分:1
  • 696516资源总数
  • 106459会员总数
  • 0今日下载