Ⅰ.概述 本文讲述关于STM32功能比较强大的ADC模块.ADC(Analog to Digital Converter)也就是模拟量转化为数字量,而STM32的ADC模块功能比较多,本文主要讲述“三条通道逐次转换(单次.单通道软件触发)”. 根据笔者的经验,STM32所有系列芯片的ADC模块功能及配置都差不多.因此,本文虽是以F1为例,其实其他系列(F0.F2.F4等)都适用. 本文提供实例代码:三条通道,配置为逐次转换(间隔模式),适用软件触发转换(每触发一次转换一条通道),一个循环也就是需
在做机器视觉时,常常要将一个多通道图像分离成几个单通道图像或者将几个单通道图像合成一个多通道图像,以方便图像处理,但是.写这篇博客,是为加深对这两个概念的理解,下面会给出部分OpenCV对单通道与多通道图像间相互转化的程序代码,并对运行结果进行观察分析. OpenCV中常用IplImage或CvMat存储图像矩阵,而对这两个对象的初始化函数cvCreateImage(CvSize size, int depth, int channels )和cvCreateMat( int rows, int
#include <opencv2\core.hpp> #include <opencv2\highgui.hpp> #include <opencv2\imgproc.hpp> using namespace cv; const int LowTh_Max = 20; const int HighTh_Max = 100; int g_HighTh, g_LowTh; Mat srcImage; Mat dstImage; void on_Trackbar(int,
在GIS软件的开发中,经常用到开源库GDAL读取Shp数据,当shp数据中包含投影信息时,可能会遇到“Unable to open EPSG support file gcs.csv”错误提示,该错误是由于没有设置“GDAL_DATA”引起的. 1.Shpefile文件组成 Shapefile文件指的是一种文件存储的方法,实际上该种文件格式是由多个文件组成的.其中,要组成一个Shapefile,有三个文件是必不可少的,它们分别是".shp", ".shx"与 &qu
一:构造并访问单通道. int main(){ cv::Mat m=(cv::Mat_<int>(3,2)<<1,2,3,4,5,6); for(int i=0;i<m.rows;++i){ for(int j=0;j<m.cols;++j) std::cout<<m.at<int>(i,j)<<","; // row Index along the dimension 0,col Index along the
部分源码选自GDAL库的官方网址:www.gdal.org,其余的代码为笔者自己编写. // readfile.cpp : 定义控制台应用程序的入口点. // /* part of the codes were cite from: http://www.gdal.org/gdal_tutorial.html and remaining of code were created :by www.cnblogs.com/AmatVictorialCuram/ and please mark th
C#下GDAL的使用这里就不多赘述了.參见上一篇博客. 代码中都加了凝视,这里就不再一一叙述了.代码例如以下: class FloodSimulation { #region 类成员变量 public Dataset m_DEMDataSet; //DEM数据集 public Dataset m_FloodSimulatedDataSet; //洪涝淹没范围数据集 public int m_XSize; //数据X方向栅格个数 public int m_YSize; //数据Y方向栅格个数 pu
探测地球云层分布的CloudSat和CALIPSO卫星 http://www.nasa.gov/mission_pages/calipso/main/index.html http://www.nasa.gov/topics/earth/features/calipso-1billion.html Cloud-Aerosol Lidar and Infrared Pathfinder Satellite Observation (CALIPSO) The occasion was on CALI
环境:VS2010,C#,GDAL1.7 读取影像: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Diagnostics; using System.