How to use projector下载
相关下载链接://download.csdn.net/download/ting06281012/3642404?utm_source=bbsseo
相关推荐
Unit6 Good Manners语法教案示例四 人教版.doc
Unit6 Good Manners语法教案示例四 人教版.doc
javacv-platform-1.3.3-src
视频人脸识别,取代jmf。。。 Introduction JavaCV uses wrappers from the JavaCPP Presets of commonly used libraries by researchers in the field of computer vision (OpenCV, FFmpeg, libdc1394, PGR FlyCapture, OpenKinect, librealsense, CL PS3 Eye Driver, videoInput, ARToolKitPlus, and flandmark), and provides utility classes to make their functionality easier to use on the Java platform, including Android. JavaCV also comes with hardware accelerated full-screen image display (CanvasFrame and GLCanvasFrame), easy-to-use methods to execute code in parallel on multiple cores (Parallel), user-friendly geometric and color calibration of cameras and projectors (GeometricCalibrator, ProCamGeometricCalibrator, ProCamColorCalibrator), detection and matching of feature points (ObjectFinder), a set of classes that implement direct image alignment of projector-camera systems (mainly GNImageAligner, ProjectiveTransformer, ProjectiveColorTransformer, ProCamTransformer, and ReflectanceInitializer), a blob analysis package (Blobs), as well as miscellaneous functionality in the JavaCV class. Some of these classes also have an OpenCL and OpenGL counterpart, their names ending with CL or starting with GL, i.e.: JavaCVCL, GLCanvasFrame, etc. To learn how to use the API, since documentation currently lacks, please refer to the Sample Usage section below as well as the sample programs, including two for Android (FacePreview.java and RecordActivity.java), also found in the samples directory. You may also find it useful to refer to the source code of ProCamCalib and ProCamTracker as well as examples ported from OpenCV2 Cookbook and the associated wiki pages. Please keep me informed of any updates or fixes you make to the code so that I may integrate them into the next release. Thank you! And feel free to ask questions on the mailing list if you encounter any problems with the software! I am sure it is far from perfect... Downloads To install manually the JAR files, obtain the following archives and follow the instructions in the Manual Installation section below. JavaCV 1.3.3 binary archive javacv-platform-1.3.3-bin.zip (212 MB) JavaCV 1.3.3 source archive javacv-platform-1.3.3-src.zip (456 KB) The binary archive contains builds for Android, Linux, Mac OS X, and Windows. The JAR files for specific child modules or platforms can also be obtained individually from the Maven Central Repository. We can also have everything downloaded and installed automatically with: Maven (inside the pom.xml file) <dependency> <groupId>org.bytedeco</groupId> <artifactId>javacv-platform</artifactId> <version>1.3.3</version> </dependency> Gradle (inside the build.gradle file) dependencies { compile group: 'org.bytedeco', name: 'javacv-platform', version: '1.3.3' } sbt (inside the build.sbt file) libraryDependencies += "org.bytedeco" % "javacv-platform" % "1.3.3" This downloads binaries for all platforms, but to get binaries for only one platform we can set the javacpp.platform system property (via the -D command line option) to something like android-arm, linux-x86_64, macosx-x86_64, windows-x86_64, etc. Please refer to the README.md file of the JavaCPP Presets for details. Another option available for Scala users is sbt-javacv. Required Software To use JavaCV, you will first need to download and install the following software: An implementation of Java SE 7 or newer: OpenJDK http://openjdk.java.net/install/ or Sun JDK http://www.oracle.com/technetwork/java/javase/downloads/ or IBM JDK http://www.ibm.com/developerworks/java/jdk/ Further, although not always required, some functionality of JavaCV also relies on: CL Eye Platform SDK (Windows only) http://codelaboratories.com/downloads/ Android SDK API 14 or newer http://developer.android.com/sdk/ JOCL and JOGL from JogAmp http://jogamp.org/ Finally, please make sure everything has the same bitness: 32-bit and 64-bit modules do not mix under any circumstances. Manual Installation Simply put all the desired JAR files (opencv*.jar, ffmpeg*.jar, etc.), in addition to javacpp.jar and javacv.jar, somewhere in your class path. Here are some more specific instructions for common cases: NetBeans (Java SE 7 or newer): In the Projects window, right-click the Libraries node of your project, and select "Add JAR/Folder...". Locate the JAR files, select them, and click OK. Eclipse (Java SE 7 or newer): Navigate to Project > Properties > Java Build Path > Libraries and click "Add External JARs...". Locate the JAR files, select them, and click OK. IntelliJ IDEA (Android 4.0 or newer): Follow the instructions on this page: http://developer.android.com/training/basics/firstapp/ Copy all the JAR files into the app/libs subdirectory. Navigate to File > Project Structure > app > Dependencies, click +, and select "2 File dependency". Select all the JAR files from the libs subdirectory. After that, the wrapper classes for OpenCV and FFmpeg, for example, can automatically access all of their C/C++ APIs: OpenCV documentation FFmpeg documentation Sample Usage The class definitions are basically ports to Java of the original header files in C/C++, and I deliberately decided to keep as much of the original syntax as possible. For example, here is a method that tries to load an image file, smooth it, and save it back to disk: import static org.bytedeco.javacpp.opencv_core.*; import static org.bytedeco.javacpp.opencv_imgproc.*; import static org.bytedeco.javacpp.opencv_imgcodecs.*; public class Smoother { public static void smooth(String filename) { IplImage image = cvLoadImage(filename); if (image != null) { cvSmooth(image, image); cvSaveImage(filename, image); cvReleaseImage(image); } } } JavaCV also comes with helper classes and methods on top of OpenCV and FFmpeg to facilitate their integration to the Java platform. Here is a small demo program demonstrating the most frequently useful parts: import java.io.File; import java.net.URL; import org.bytedeco.javacv.*; import org.bytedeco.javacpp.*; import org.bytedeco.javacpp.indexer.*; import static org.bytedeco.javacpp.opencv_core.*; import static org.bytedeco.javacpp.opencv_imgproc.*; import static org.bytedeco.javacpp.opencv_calib3d.*; import static org.bytedeco.javacpp.opencv_objdetect.*; public class Demo { public static void main(String[] args) throws Exception { String classifierName = null; if (args.length > 0) { classifierName = args[0]; } else { URL url = new URL("https://raw.github.com/Itseez/opencv/2.4.0/data/haarcascades/haarcascade_frontalface_alt.xml"); File file = Loader.extractResource(url, null, "classifier", ".xml"); file.deleteOnExit(); classifierName = file.getAbsolutePath(); } // Preload the opencv_objdetect module to work around a known bug. Loader.load(opencv_objdetect.class); // We can "cast" Pointer objects by instantiating a new object of the desired class. CvHaarClassifierCascade classifier = new CvHaarClassifierCascade(cvLoad(classifierName)); if (classifier.isNull()) { System.err.println("Error loading classifier file \"" + classifierName + "\"."); System.exit(1); } // The available FrameGrabber classes include OpenCVFrameGrabber (opencv_videoio), // DC1394FrameGrabber, FlyCaptureFrameGrabber, OpenKinectFrameGrabber, OpenKinect2FrameGrabber, // RealSenseFrameGrabber, PS3EyeFrameGrabber, VideoInputFrameGrabber, and FFmpegFrameGrabber. FrameGrabber grabber = FrameGrabber.createDefault(0); grabber.start(); // CanvasFrame, FrameGrabber, and FrameRecorder use Frame objects to communicate image data. // We need a FrameConverter to interface with other APIs (Android, Java 2D, or OpenCV). OpenCVFrameConverter.ToIplImage converter = new OpenCVFrameConverter.ToIplImage(); // FAQ about IplImage and Mat objects from OpenCV: // - For custom raw processing of data, createBuffer() returns an NIO direct // buffer wrapped around the memory pointed by imageData, and under Android we can // also use that Buffer with Bitmap.copyPixelsFromBuffer() and copyPixelsToBuffer(). // - To get a BufferedImage from an IplImage, or vice versa, we can chain calls to // Java2DFrameConverter and OpenCVFrameConverter, one after the other. // - Java2DFrameConverter also has static copy() methods that we can use to transfer // data more directly between BufferedImage and IplImage or Mat via Frame objects. IplImage grabbedImage = converter.convert(grabber.grab()); int width = grabbedImage.width(); int height = grabbedImage.height(); IplImage grayImage = IplImage.create(width, height, IPL_DEPTH_8U, 1); IplImage rotatedImage = grabbedImage.clone(); // Objects allocated with a create*() or clone() factory method are automatically released // by the garbage collector, but may still be explicitly released by calling release(). // You shall NOT call cvReleaseImage(), cvReleaseMemStorage(), etc. on objects allocated this way. CvMemStorage storage = CvMemStorage.create(); // The OpenCVFrameRecorder class simply uses the CvVideoWriter of opencv_videoio, // but FFmpegFrameRecorder also exists as a more versatile alternative. FrameRecorder recorder = FrameRecorder.createDefault("output.avi", width, height); recorder.start(); // CanvasFrame is a JFrame containing a Canvas component, which is hardware accelerated. // It can also switch into full-screen mode when called with a screenNumber. // We should also specify the relative monitor/camera response for proper gamma correction. CanvasFrame frame = new CanvasFrame("Some Title", CanvasFrame.getDefaultGamma()/grabber.getGamma()); // Let's create some random 3D rotation... CvMat randomR = CvMat.create(3, 3), randomAxis = CvMat.create(3, 1); // We can easily and efficiently access the elements of matrices and images // through an Indexer object with the set of get() and put() methods. DoubleIndexer Ridx = randomR.createIndexer(), axisIdx = randomAxis.createIndexer(); axisIdx.put(0, (Math.random()-0.5)/4, (Math.random()-0.5)/4, (Math.random()-0.5)/4); cvRodrigues2(randomAxis, randomR, null); double f = (width + height)/2.0; Ridx.put(0, 2, Ridx.get(0, 2)*f); Ridx.put(1, 2, Ridx.get(1, 2)*f); Ridx.put(2, 0, Ridx.get(2, 0)/f); Ridx.put(2, 1, Ridx.get(2, 1)/f); System.out.println(Ridx); // We can allocate native arrays using constructors taking an integer as argument. CvPoint hatPoints = new CvPoint(3); while (frame.isVisible() && (grabbedImage = converter.convert(grabber.grab())) != null) { cvClearMemStorage(storage); // Let's try to detect some faces! but we need a grayscale image... cvCvtColor(grabbedImage, grayImage, CV_BGR2GRAY); CvSeq faces = cvHaarDetectObjects(grayImage, classifier, storage, 1.1, 3, CV_HAAR_FIND_BIGGEST_OBJECT | CV_HAAR_DO_ROUGH_SEARCH); int total = faces.total(); for (int i = 0; i < total; i++) { CvRect r = new CvRect(cvGetSeqElem(faces, i)); int x = r.x(), y = r.y(), w = r.width(), h = r.height(); cvRectangle(grabbedImage, cvPoint(x, y), cvPoint(x+w, y+h), CvScalar.RED, 1, CV_AA, 0); // To access or pass as argument the elements of a native array, call position() before. hatPoints.position(0).x(x-w/10) .y(y-h/10); hatPoints.position(1).x(x+w*11/10).y(y-h/10); hatPoints.position(2).x(x+w/2) .y(y-h/2); cvFillConvexPoly(grabbedImage, hatPoints.position(0), 3, CvScalar.GREEN, CV_AA, 0); } // Let's find some contours! but first some thresholding... cvThreshold(grayImage, grayImage, 64, 255, CV_THRESH_BINARY); // To check if an output argument is null we may call either isNull() or equals(null). CvSeq contour = new CvSeq(null); cvFindContours(grayImage, storage, contour, Loader.sizeof(CvContour.class), CV_RETR_LIST, CV_CHAIN_APPROX_SIMPLE); while (contour != null && !contour.isNull()) { if (contour.elem_size() > 0) { CvSeq points = cvApproxPoly(contour, Loader.sizeof(CvContour.class), storage, CV_POLY_APPROX_DP, cvContourPerimeter(contour)*0.02, 0); cvDrawContours(grabbedImage, points, CvScalar.BLUE, CvScalar.BLUE, -1, 1, CV_AA); } contour = contour.h_next(); } cvWarpPerspective(grabbedImage, rotatedImage, randomR); Frame rotatedFrame = converter.convert(rotatedImage); frame.showImage(rotatedFrame); recorder.record(rotatedFrame); } frame.dispose(); recorder.stop(); grabber.stop(); } } Furthermore, after creating a pom.xml file with the following content: <project> <modelVersion>4.0.0</modelVersion> <groupId>org.bytedeco.javacv</groupId> <artifactId>demo</artifactId> <version>1.3.3</version> <dependencies> <dependency> <groupId>org.bytedeco</groupId> <artifactId>javacv-platform</artifactId> <version>1.3.3</version> </dependency> </dependencies> </project> And by placing the source code above in src/main/java/Demo.java, we can use the following command to have everything first installed automatically and then executed by Maven: $ mvn compile exec:java -Dexec.mainClass=Demo Build Instructions If the binary files available above are not enough for your needs, you might need to rebuild them from the source code. To this end, the project files were created for: Maven 3.x http://maven.apache.org/download.html JavaCPP 1.3 https://github.com/bytedeco/javacpp JavaCPP Presets 1.3 https://github.com/bytedeco/javacpp-presets Once installed, simply call the usual mvn install command for JavaCPP, its Presets, and JavaCV. By default, no other dependencies than a C++ compiler for JavaCPP are required. Please refer to the comments inside the pom.xml files for further details. Project lead: Samuel Audet [samuel.audet at gmail.com](mailto:samuel.audet at gmail.com) Developer site: https://github.com/bytedeco/javacv Discussion group: http://groups.google.com/group/javacv
基于MPC+二自由度动力学的车辆轨迹跟踪+横向控制Carsim和Simulink联合仿真(Matlab代码、Simulink仿真实现)
内容概要:本文系统阐述了基于模型预测控制(MPC)与二自由度车辆动力学模型的轨迹跟踪与横向控制方法,通过Carsim与Simulink联合仿真平台实现了Matlab代码与Simulink模型的协同验证。该方法结合MPC算法的滚动时域优化特性与车辆二自由度动力学模型的运动学精度,构建了高精度的路径跟踪控制系统,能够有效提升自动驾驶车辆在复杂工况下的行驶稳定性与轨迹跟随精度。文中详细介绍了控制策略设计、车辆动力学建模、仿真参数配置、联合仿真接口搭建及结果分析全过程,涵盖了状态预测、代价函数构建、约束处理与优化求解等核心环节,适用于智能驾驶中路径规划与跟踪控制系统的研发与验证。; 适合人群:具备车辆动力学、现代控制理论(如最优控制、预测控制)基础知识,熟练掌握Matlab/Simulink与Carsim仿真工具,从事自动驾驶、智能车辆控制算法开发的研究生、科研人员及工程技术人员。; 使用场景及目标:①用于智能网联汽车与无人驾驶系统中横向控制算法的设计与性能验证;②作为MPC在车辆运动控制中应用的教学案例,辅助高校课程实践与科研训练;③支撑高水平学术论文复现、课题申报与工程原型开发。; 阅读建议:建议读者在Carsim与Simulink联合仿真环境下动手复现,重点掌握MPC控制器中预测模型的建立、权重系数调节、约束设定及实时性优化等关键技术,并尝试在不同道路曲率、车速及路面附着条件下进行鲁棒性测试,进一步拓展至非线性MPC或自适应MPC等先进控制策略的研究。
基于线性时变模型预测控制的车辆轨迹跟踪系统研究(Matlab代码、Simulink仿真实现)
内容概要:本文系统研究了基于线性时变模型预测控制(LTV-MPC)的车辆轨迹跟踪系统,利用Matlab与Simulink工具搭建完整的控制系统仿真模型。研究首先建立车辆动力学模型,并通过局部线性化方法将非线性系统转化为时变状态空间模型,进而构建包含状态预测、滚动优化与反馈校正的MPC控制框架。文中详细阐述了目标函数设计、约束条件处理(如输入饱和、状态边界)、预测时域与控制时域设定等关键技术环节,重点分析LTV-MPC在不同行驶工况下对参考轨迹的跟踪精度、稳定性和实时性表现。通过与传统线性MPC的对比仿真,验证了LTV-MPC在应对系统非线性、提升轨迹跟踪性能方面的显著优势,充分展现了其在自动驾驶路径跟踪中的工程应用价值。; 适合人群:具备自动控制理论、车辆动力学及优化算法基础,熟练掌握Matlab/Simulink编程环境,从事智能驾驶决策控制、路径规划、先进驾驶辅助系统(ADAS)研发的科研人员、工程技术人员及研究生。; 使用场景及目标:①掌握车辆轨迹跟踪中MPC控制器的设计与实现方法;②学习如何将非线性车辆模型在线线性化并集成到预测控制框架中;③深入理解LTV-MPC相较于固定参数MPC的性能优势与适用边界;④通过仿真调试优化权重矩阵、预测时域等关键参数,提升实际控制效果;⑤为自动驾驶系统的控制模块开发、学术论文撰写或毕业课题提供可复现的技术方案与仿真平台。; 阅读建议:建议读者结合所提供的Matlab代码与Simulink模型,逐步运行并剖析各功能模块,重点关注车辆模型线性化过程、状态预测模块构建、QP求解器配置及约束处理机制,通过调整工况和控制参数进行对比实验,深入掌握LTV-MPC的调控机理与性能优化方法。
基于扩展卡尔曼滤波(EKF)的激光雷达与雷达异构传感器融合算法研究(Matlab代码实现)
内容概要:本文系统性解读了一套完整的多机器人路径规划(MAPF)MATLAB代码库,聚焦于优先级规划算法的工程实现,提出将求解过程划分为几何解析、拓扑建模、调度优化与可视化呈现四个解耦层次的模块化框架。文章深入阐述了动态边权膨胀、节点预留历史、几何惩罚驱动的局部同步机制、Petri网双阶段优化以及双坐标系统可视化等核心技术设计,实现了空间路径规划与时间冲突消解的有效分离,在保障多项式时间复杂度的前提下显著提升了路径规划的成功率与计算效率。该框架不仅具备良好的可复现性和工程扩展性,还为MAPF领域的算法研究、性能评估与教学实践提供了系统化的参考范例。; 适合人群:具备一定MATLAB编程基础,从事机器人路径规划、智能交通、自动化控制、多智能体系统等相关领域的科研人员、工程技术人员及研究生。; 使用场景及目标:① 深入理解并复现多智能体路径规划中优先级规划与冲突消解的核心机制;② 学习如何将复杂的MAPF问题分解为几何、拓扑、调度与呈现的模块化工程实现方法;③ 借鉴动态边权惩罚、Petri网建模、局部同步优化等创新设计思路,以提升自身路径规划算法的鲁棒性与效率。; 阅读建议:建议读者结合文中提供的MATLAB代码与MovingAI标准地图数据集,严格按照章节顺序逐步实现各模块功能,并通过内置的动画演示工具直观观察算法执行过程,重点关注各模块间的接口设计、关键参数(如惩罚权重、同步阈值)的调优策略及其对整体性能的影响。


下载资源悬赏专区
