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

python hog 特征提取

于 2022-04-02 发布 文件大小:1.42 kB
0 151
下载积分: 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 estadisticas
    2022-01-22 07:23:10下载
    积分:1
  • python27-x64
    toyota erc kalkulator.
    2019-03-08 01:58:18下载
    积分:1
  • ann-windspeed-forecast-master
    说明:  使用深度学习算法ANN对风速数据进行预测,最后的预测效果很好(Using ANN algorithm to predict wind speed)
    2021-02-11 13:39:51下载
    积分:1
  • 知乎爬虫
    说明:  简单的知乎爬虫,输入关键词,爬取该关键词下的提问,回答,点赞数等,以csv格式存储(Simple Zhihu crawler, input key words, crawl the questions, answers and likes under the key words, and store them in CSV format)
    2020-04-13 12:01:26下载
    积分:1
  • ntpserver
    Python 抓取 COM Port 未完成(Python Serach COM Port non Fininshed)
    2019-01-23 17:07:10下载
    积分:1
  • homework_SVM.py
    说明:  实现支持向量机SVM算法,用于iris分类,包括用cvxopt进行优化(Implement SVM algorithm for iris classification, including cvxopt optimization)
    2018-12-25 23:43:05下载
    积分:1
  • 机器学习题目代码及数据文件
    说明:  实现强化学习,完成人工智能,实现机器学习,掌握学习算法(Realize reinforcement learning, artificial intelligence, machine learning and deep learning)
    2021-03-24 09:00:37下载
    积分:1
  • ga_tsp
    利用遗传算法来解决经典的旅行商TSP问题,python 编码(Using genetic algorithm to solve the classic TSP traveling salesman problem, the programming language is Python)
    2020-06-28 19:40:01下载
    积分:1
  • wrfout文件变量提取
    使用python简单提取wrfout数据并绘图。及使用ncl语言提取wrfout数据并绘图(Use Python to extract wrfout data and draw. And use NCL language to extract wrfout data and plot.)
    2021-03-29 20:19:10下载
    积分:1
  • 朱芳清 201711010192 wk7
    说明:  Python编写的简单爬虫程序,能够爬取网站上指定名称指定大小的图片并下载。还有一个简单的正则表达式小程序。(A simple crawler written in Python can crawl and download pictures of the specified size and name on the website. There is also a simple regular expression applet.)
    2020-01-15 22:21:56下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载