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

python hog 特征提取

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

  • CARO-System-Specification---Pham-Cao-Nhat-Phuong-
    Caro game system specification Netcetric
    2013-12-12 01:52:14下载
    积分:1
  • udp聊天室16031125
    说明:  基于udp的网络聊天室,使用python语言,具有注册登录公频聊天和私聊等功能。(The Internet chat room based on UDP, using Python language, has the functions of registering and logging in public frequency chat and private chat.)
    2020-05-23 14:09:09下载
    积分:1
  • 华泰证券人工智能系列
    说明:  华泰证券人工智能系列研报 1-36 ,金融工程机器学习入门(Huatai Securities artificial intelligence series 1-36, introduction to financial engineering machine learning)
    2021-03-17 17:49:20下载
    积分:1
  • pic2txt.py
    图片转字符画,可以保存为txt等格式(Python语言)(convert picture to character painting by python)
    2018-11-08 11:38:04下载
    积分:1
  • rtyt
    Note that documents referenced in the that still say Chrysler are valid and applicable
    2018-02-26 09:39:57下载
    积分:1
  • logger
    说明:  日志模块,日志记录,适用于所有程序,可直接调用。(Logging module, log recording)
    2020-06-20 19:40:02下载
    积分:1
  • vggpython代码
    自己写的一个vgg16的简单代码,使用python来编写的,如果有需要欢迎下载,不过对应的参数文件需要自行去下载,你也可以用这个自行下载数据集进行训练,自己写的一个vgg16的简单代码,使用python来编写的,如果有需要欢迎下载,不过对应的参数文件需要自行去下载,你也可以用这个自行下载数据集进行训练
    2022-08-24 03:01:44下载
    积分:1
  • ABCalgorithm
    说明:  人工蜂群算法 算法 用户均衡模型 frankwolfe算法(Artificial Bee Colony Algorithms User Equilibrium Model Frankwolfe Algorithms)
    2021-04-20 19:38:50下载
    积分:1
  • PyCharm 中文指南.pdf
    python基础,本书是一本面向 Python 开发者的 PyCharm 详细使用指南。
    2021-05-06下载
    积分:1
  • 资料
    说明:  关于Python的一些资料,帮助快速学习Python(The Guide of Python Quickly)
    2020-06-17 08:40:02下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载