ICode9

精准搜索请尝试: 精确搜索
  • WebUI_Demo2022-06-16 17:34:07

    from time import sleepfrom selenium import webdriverfrom selenium.webdriver.common.by import Byfrom selenium.webdriver.support.wait import WebDriverWait# from selenium.webdriver.chrome.webdriver import WebDriver# web = WebDriver(executable_path='chro

  • 图片分割2022-06-14 18:01:36

    package opencv; import java.util.ArrayList;import java.util.List; import org.opencv.core.Core;import org.opencv.core.CvType;import org.opencv.core.Mat;import org.opencv.core.MatOfPoint;import org.opencv.core.Point;import org.opencv.core.Rect;import org.op

  • 建立数据集2022-06-14 18:00:23

    根据图片的分割写了可以批量处理的程序建立数据集,现在只是第一步,之后还要进行人工分类,大多是时间用来分类 package opencv; import java.util.ArrayList;import java.util.List; import org.opencv.core.Core;import org.opencv.core.CvType;import org.opencv.core.Mat;import or

  • 正则表达式2022-06-13 00:01:35

    正则表达式是一种高级的字符串匹配表达式,英文名为 “Regular expression”,简写成 “regex” 或 “regexp”。它可以从一个基础字符串中根据一定的匹配模式替换文本中的字符串、验证表单、提取字符串等等。 基本匹配规则 我们平常使用的CTRL + F 就是这种最基本的匹配规则,即输入一

  • 【ROS】因opencv版本的问题,IplImage报错2022-06-12 20:33:16

    opencv4.2.0开始不再支持Mat类型到IplImage类型的转换。 IplImage 在OpenCV中IplImage是表示一个图像的结构体,也是从OpenCV1.0到目前最为重要的一个结构; 在之前的图像表示用IplImage,而且之前的OpenCV是用C语言编写的,提供的接口也是C语言接口; Mat Mat是后来OpenCV封装的一个C++

  • LeetCode 1901. Find a Peak Element II2022-06-10 14:31:09

    原题链接在这里:https://leetcode.com/problems/find-a-peak-element-ii/ 题目: A peak element in a 2D grid is an element that is strictly greater than all of its adjacent neighbors to the left, right, top, and bottom. Given a 0-indexed m x n matrix mat w

  • Mat中step的含义2022-06-09 10:32:20

    以三维的Mat数据布局为例     step这里指出的是图像在各个梯级上的字节数大小,而这里的梯级指的是构成图像的名层次。 上图三维图像由一个一个名面(第一级)构成,每一个平面由一行一行(第二级)构成,每行由一个一个点(第三级)构成。 同理:二维图像由一行一行(第一级)构成,而每一行又由一个一

  • [mine638]2022-06-01 18:00:10

    题意:给定平面上$n$个点$P_{i}(x_{i},y_{i})$和$n$个向量$(u_{i},v_{i})$,构造排列$\{p_{i}\}$满足—— 记$P'_{i}(x_{i}+u_{p_{i}},y_{i}+v_{p_{i}})$,要求$\forall (i,j),d(P_{i},P_{j})\le d(P'_{i},P'_{j})$并最大化$\sum_{i,j}d^{2}(P'_{i},P'_{j})$ $1\le n\le 500$

  • LeetCode 542 01 Matrix 多源BFS2022-05-20 05:31:27

    Given an m x n binary matrix mat, return the distance of the nearest 0 for each cell. The distance between two adjacent cells is 1. Solution 给定一个 \(01\)矩阵,要求每个点离最近的 \(0\) 的距离(曼哈顿距离)。虽然是 \(DP\) 的标签,但其实应该是 \(BFS\) 来解决。我们先

  • 【笔记】Dilworth定理2022-05-16 20:33:40

    给定一个有向无环图,我们称 \(x,y\) 存在关系当且仅当存在 \(x\to y\) 或者 \(y \to x\) 的边。最长链为最大的集合使得其中任意两个元素存在关系,最长反链为最大的集合使得其中任意两个元素不存在关系。 Dilworth 定理:最长反链等于最小链覆盖。 最小链覆盖为用最少的链(可以相交)覆盖

  • 高斯约旦消元法2022-05-13 09:32:25

    用来求解n元一次线性方程组 核心思想: 把方程组塞到一个矩阵里得到一个\(n*n+1\)的矩阵,第\(i\)行表示第\(i\)个方程,\(Mat[i][j]\)表示第\(i\)个方程中\(xj\)的系数 \(Mat[i][n+1]\)为一个常数,即等号右面的常数 把\(xi\)的系数都集中于第\(i\)行(对角线上),\(xi\)为当前选择的主元,然后

  • Leetcode 498. 对角线遍历2022-05-10 04:31:06

    498. 对角线遍历 - 力扣(LeetCode)       思路 找规律 1. 设x,y为数组下标,x+y为偶数时,向右上遍历。x+y为奇数时,向左下遍历。 2. 在向左下遍历时 先考虑边界1 当前在最后一行,则向右移动一格 y+1;再考虑边界 2 当前在第一列,向下移动一格 x+1; 其他情况 x+1,y-1 3. 在向右上遍历时

  • 记录opencv使用extractChannel获取单通道时访问报错2022-04-30 12:31:48

    使用extractChannel获取单通道数据时,遇到指针访问报错: extractChannel原型: void extractChannel(InputArray src, OutputArray dst, int coi) 问题代码: extractChannel(*img, cv::Mat(img->rows, img->cols, CV_32FC1, data + img->rows * img->cols), 0) img: 提取通道图片

  • leetcode 542 01 Matrix, 01矩阵 JavaScript解法2022-04-29 11:34:23

    题目描述: Given an m x n binary matrix mat, return the distance of the nearest 0 for each cell. The distance between two adjacent cells is 1. Example 1: Input: mat = [[0,0,0],[0,1,0],[0,0,0]] Output: [[0,0,0],[0,1,0],[0,0,0]]给定一个二维数组组成的矩

  • C# OpenCVsharp 关于图片透明部分的处理2022-04-28 16:35:47

      new Mat(backgroundImg.Size(), MatType.CV_8UC4, new Scalar(0,0,0,255)); 初始化,4通道的 Mat 图。CV_8UC4  意思是:  每个像素点  8 Bit ,   4   通道。 Scalar(B,G,R,A)      其中  A   为透明度。255为不透明,0为全透。 Vec4b color = matSrc2.Get<Vec4

  • script 22022-04-26 19:35:31

    import bpy import random # Clear all nodes in a mat def clear_material( material ): if material.node_tree: material.node_tree.links.clear() material.node_tree.nodes.clear() def newMaterial(id, r , g ,b): #mat = bpy.data.

  • Tensflow学习笔记2022-04-24 22:33:00

    import tensorflow as tf sess=tf.compat.v1.Session()a=tf.constant(32) #创建常量b=tf.constant(10) #创建常量#加法a+b+bd=tf.add_n([a,b,b])print(d) 运行结果: Tensor("AddN_3:0", shape=(), dtype=int32) #减法a-be=tf.subtract(a,b)print(b) 运行结果: Tensor("Const_17:0&q

  • 读取 rgb planner 二进制数据 resize 重采样2022-04-23 00:04:00

    #include <fstream> #include <iostream> #include <opencv2/opencv.hpp> using namespace cv; using namespace std; int main(int argc, char **argv) {     const uint32_t cols = 640;     const uint32_t rows = 426;     ifstream fin0("0000

  • opencv rgb plannar 读取 转 rgb888保存2022-04-22 23:34:27

    #include <fstream> #include <iostream> #include <opencv2/imgcodecs.hpp> #include <opencv2/opencv.hpp> using namespace cv; using namespace std; int main(int argc, char **argv) {     const uint32_t cols = 24;     const uint32_t row

  • [Python]-机器学习Python入门《Python机器学习手册》-01-向量、矩阵和数组2022-04-20 22:03:41

    《Python机器学习手册——从数据预处理到深度学习》 这本书类似于工具书或者字典,对于python具体代码的调用和使用场景写的很清楚,感觉虽然是工具书,但是对照着做一遍应该可以对机器学习中python常用的这些库有更深入的理解,在应用中也能更为熟练。 以下是根据书上的代码进行实操,注释

  • [LeetCode] 1292. Maximum Side Length of a Square with Sum Less than or Equal to Threshold 元素和小于等于阈值的2022-04-15 10:02:21

    Given a m x n matrix mat and an integer threshold, return the maximum side-length of a square with a sum less than or equal to threshold or return 0 if there is no such square. Example 1: Input: mat = [[1,1,3,2,4,3,2],[1,1,3,2,4,3,2],[1,1,3,2,4,3,

  • opencv 尝试定位车牌号2022-04-09 23:03:36

    通过opencv Java尝试定位车牌号位置 代码如下 package opencv; import java.util.ArrayList;import java.util.List; import org.opencv.core.Core;import org.opencv.core.CvType;import org.opencv.core.Mat;import org.opencv.core.MatOfPoint;import org.opencv.core.Point;im

  • VS中OpenCVSharp的配置及测试2022-04-08 16:33:47

    1、什么是OpenCVSharp OpenCVSharp有一名日本工程师开发,项目地址为:https://github.com/shimat/opencvsharp。其是OpenCV的.NET wrapper,它比Emgucv更接近于原始的OpenCV,并且有很多的样例参考。 2、OpenCVSharp特点 直接封装了更多的OpenCV方法,降低了学习的难度,比EmguCV更便于使用

  • 《九日集训》第十五轮 (第七讲) 二维数组2022-04-03 12:00:27

    知识点 二维数组 int diagonalSum(int** mat, int matSize, int* matColSize){ r = matSize; c = matColSize[0]; // TODO } 题目分析 题目1 1351. 统计有序矩阵中的负数 分析 因为矩阵是有序的,所以每一行的数据个数等于每行数组长度减去第一个负数的位置 代码 clas

  • 图像分水岭法图像分割2022-04-01 17:00:52

           C++: void distanceTransform(InputArray src, OutputArray dst, int distanceType, int maskSize)   参数详解: InputArray src:输入的图像,一般为二值图像  OutputArray dst:输出的图像 int distanceType:所用的求解距离的类型、 It can be CV_DIST_L1,

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有