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

python hog 特征提取

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

  • Python gabor
    首先说一下环境,windows 8.0 64位系统,OpenCV版本为2.4.7, Python 版本为2.7.6,IDE为 64位 Anaconda 目的是实现图像的Gabor特征提取,分三个小程序完成 首先说一下环境,windows 8.0 64位系统,OpenCV版本为2.4.7, Python 版本为2.7.6,IDE为 64位 Anaconda 目的是实现图像的Gabor特征提取,分三个小程序完成
    2022-05-19 18:13:17下载
    积分:1
  • LSTM股票预测
    说明:  Lstm进行时间序列预测,预测股票数据,按日的数据(Prediction of time series by LSTM)
    2020-08-30 16:08:10下载
    积分:1
  • chapter_20
    说明:  聚焦爬虫的工作流程较为复杂,需要根据一定的网页分析算法过滤与主题无关的链接,保留有用的链接并将其放入等待抓取的URL队列。(The workflow of focusing on crawlers is more complicated, and it is necessary to filter the links irrelevant to the topic according to certain webpage analysis algorithms, retain useful links and put them into the queue of URLs waiting to be crawled.)
    2020-09-08 16:08:04下载
    积分:1
  • _Python_Part_
    说明:  交通仿真模拟,道路模型,车辆模型,驾驶模式模型(Traffic simulationRoad model, vehicle model, driving mode model)
    2020-05-20 14:20:09下载
    积分:1
  • 基于matlab的人数统计
    基于matlab的教室人数统计,主要是通过定位人脸,计算人脸的个数来实现
    2022-08-12 12:38:43下载
    积分:1
  • ATR价格突破策略
    ATR价格突破策略,非常好用,免费提供给大家(ATR price breakthrough strategy, very useful, free to everyone)
    2020-06-20 16:40:02下载
    积分:1
  • 简易的串口通讯程序,包括GUI和串口通讯功能,以供学习 pyserial_demo
    简易的串口通讯程序,包括GUI和串口通讯功能,以供学习(Simple serial communication program, including GUI and serial communication functions, for learning)
    2020-06-25 04:20:01下载
    积分:1
  • PKU-Paraphrase-Bank-master-中文数据集
    说明:  可用于中文复述生成任务训练及测试,内涵多本中文小说相似句子对。(The data can be used for the training and testing of the Chinese retelling generation task, which can contain similar sentence pairs of many Chinese novels.)
    2020-12-17 17:07:51下载
    积分:1
  • ATR价格突破策略
    说明:  ATR价格突破策略,非常好用,免费提供给大家(ATR price breakthrough strategy, very useful, free to everyone)
    2020-06-20 16:40:02下载
    积分:1
  • 四个游戏
    说明:  四个python的小游戏 欢迎下载 使用玩耍 一起学习一起进步(Four Python games Welcome to download and use play Study together and progress together)
    2020-11-13 12:51:47下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载