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

python hog 特征提取

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

  • 字数统计
    说明:  了解基本编程知识,熟悉编程算法,字数统计。(Understand basic programming knowledge, familiar with programming algorithms, word count.)
    2020-06-23 20:40:01下载
    积分:1
  • PYTHON自然语言处理中文版
    自然语言处理一般是在本科或研究生层次的高年级开设的为期一个学期的课程。很多教 师都发现,在如此短的时间里涵盖理论和实践两个方面是十分困难的。有些课程注重理论而 排挤实践练习,剥夺了学生编写程序自动处理语言带来的挑战和兴奋感。另一些课程仅仅教 授语言学编程而不包含任何重要的NLP 内容。最初开发NLTK 就是为了解决这个问题,使 在一个学期里同时教授大量理论和实践成为可能,无论学生事先有没有编程经验。 算法和数据结构在所有NLP 教学大纲中都十分重要。它们本身可能非常枯燥,而NLT K 提供的交互式图形用户界面能一步一步看到算法过程,使它们变得鲜活。大多说NLTK 组件都有一个无需用户输入任何数据就能执行有趣的任务的示范性例子。(Natural Language Processing (NLP) is a one-semester course offered in senior grades at undergraduate or graduate levels. Many teaching Teachers have found it very difficult to cover both theoretical and practical aspects in such a short period of time. Some courses focus on theory. Crowding out practical exercises deprives students of the challenge and excitement of writing programs to deal with language automatically. Other courses are taught only Teaching Linguistic Programming without any significant NLP content.)
    2018-12-10 14:14:50下载
    积分:1
  • LSTM-Human-Activity-Recognition-master
    与经典的方法相比,使用具有长时间记忆细胞的递归神经网络(RNN)不需要或几乎不需要特征工程。数据可以直接输入到神经网络中,神经网络就像一个黑匣子,可以正确地对问题进行建模。其他研究在活动识别数据集上可以使用大量的特征工程,这是一种与经典数据科学技术相结合的信号处理方法。这里的方法在数据预处理的数量方面非常简单(Compared with the classical methods, the recursive neural network (RNN) with long-term memory cells does not need or almost need feature engineering. Data can be directly input into the neural network, which acts as a black box and can correctly model the problem. Other research can use a lot of Feature Engineering on activity recognition data sets, which is a signal processing method combined with classical data science and technology. The method here is very simple in terms of the number of data preprocessing)
    2019-06-13 18:50:02下载
    积分:1
  • image_example
    image decomposition example for python
    2020-06-16 12:40:02下载
    积分:1
  • GAN时序预测python代码
    【实例简介】 该代码使用生成对抗网络 进行时序预测
    2021-07-23 00:31:14下载
    积分:1
  • DeepMVS-master
    说明:  图像识别 安全帽检测 安全帽识别 用于安全帽的检测任务(Image recognition helmet detection helmet recognition for helmet detection task)
    2020-02-05 11:30:03下载
    积分:1
  • 粒子群算法求解机器人路径规划
    说明:  粒子算法,轨迹规划参考,适用于无人驾驶,紧急避障等(Particle algorithm, trajectory planning reference, suitable for unmanned driving, emergency obstacle avoidance, etc)
    2020-06-09 14:23:23下载
    积分:1
  • 网页暗链监测
    暗链猖狂,如何提出一种方法的网页暗链监测方法,利用python实现了一种简单的方法,可以用来参考。 暗链隐藏方式: 白色背景上显示白色文字、将文字置于图片后、使用 CSS 隐藏文字、文字异常滚动速度。
    2022-07-26 03:53:47下载
    积分:1
  • 用户信息注册管理系统【良好】
    说明:  学生成绩管理系统,实现读写文件,理信息系统(Management Information System,简称MIS)是一个以人为主导,利用计算机硬件、软件、网络通信设备以及其他办公设备,进行信息的收集、传输、加工、储存、更新、拓展和维护的系统。(The management information system (MIS) is a system that uses computer hardware, software, network communication equipment and other office equipment to collect, transmit, process, store, update, expand and maintain information.)
    2020-01-03 08:54:29下载
    积分:1
  • 基于AdBoost的分类
    程序主要是基于ADBOOST的分类算法,编程软件是python,实现的功能是在某个数据集上的应用,数据集分为训练数据和测试数据
    2023-03-08 07:05:03下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载