• 大小: 12.49MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-06-18
  • 语言: Java
  • 标签: JavaCV  0.7  bin包  

资源简介

javacv-0.7-bin.zip 我也很无奈啊,本来想把javacv-0.7-cppjars.zip和javacv-0.7-sourcecode.zip一起上传的,但csdn有个60MB限制。

资源截图

代码片段和文件信息

import com.googlecode.javacv.Blobs;
import com.googlecode.javacv.Canvasframe;

import static com.googlecode.javacv.cpp.opencv_core.*;
import static com.googlecode.javacv.cpp.opencv_highgui.*;
import static com.googlecode.javacv.cpp.opencv_imgproc.*;

///////////////////////////////////////////////////////////////////
//*                                                             *//
//* As the author of this code I place all of this code into   *//
//* the public domain. Users can use it for any legal purpose.  *//
//*                                                             *//
//*             - Dave Grossman                                 *//
//*                                                             *//
///////////////////////////////////////////////////////////////////
public class BlobDemo
{
    public static void main(String[] args)
    {
        System.out.println(“STARTING...\n“);
        demo();
        System.out.println(“ALL DONE“);
    }

    public static void demo()
    {
        int MinArea = 6;
        int ErodeCount =0;
        int DilateCount = 0;
        
        IplImage RawImage = null;

        // Read an image.
        for(int k = 0; k < 7; k++)
        {
            if(k == 0) { RawImage = cvLoadImage(“Images/BlackBalls.jpg“); MinArea = 250; ErodeCount = 0; DilateCount = 1; }
            else if(k == 1) { RawImage = cvLoadImage(“Images/Shapes1.jpg“); MinArea = 6; ErodeCount = 0; DilateCount = 1; }
            else if(k == 2) { RawImage = cvLoadImage(“Images/Shapes2.jpg“); MinArea = 250; ErodeCount = 0; DilateCount = 1; }
            else if(k == 3) { RawImage = cvLoadImage(“Images/Blob1.jpg“); MinArea = 2800; ErodeCount = 1; DilateCount = 1; }
            else if(k == 4) { RawImage = cvLoadImage(“Images/Blob2.jpg“); MinArea = 2800; ErodeCount = 1; DilateCount = 1; }
            else if(k == 5) { RawImage = cvLoadImage(“Images/Blob3.jpg“); MinArea = 2800; ErodeCount = 1; DilateCount = 1; }
            else if(k == 6) { RawImage = cvLoadImage(“Images/Rice.jpg“); MinArea = 30; ErodeCount = 2; DilateCount = 1; }       
            //ShowImage(RawImage “RawImage“ 512);
        
            IplImage GrayImage = cvCreateImage(cvGetSize(RawImage) IPL_DEPTH_8U 1);     
            cvCvtColor(RawImage GrayImage CV_BGR2GRAY);
            //ShowImage(GrayImage “GrayImage“ 512);

            IplImage BWImage = cvCreateImage(cvGetSize(GrayImage) IPL_DEPTH_8U 1); 
            cvThreshold(GrayImage BWImage 127 255 CV_THRESH_BINARY);
            //ShowImage(BWImage “BWImage“);
            
            IplImage WorkingImage = cvCreateImage(cvGetSize(BWImage) IPL_DEPTH_8U 1);     
            cvErode(BWImage WorkingImage null ErodeCount);    
            cvDilate(WorkingImage WorkingImage null DilateCount);
            //ShowImage(WorkingImage “WorkingImage“ 512);
        
            //cvSaveImage(“Images/Working.jpg“ WorkingImage);
            //PrintGrayImage(WorkingImage “WorkingImage“);
            

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2014-01-06 23:28  javacv-bin\
     文件       51196  2014-01-06 22:22  javacv-bin\README.txt
     文件       19355  2012-04-15 14:48  javacv-bin\LICENSE.txt
     目录           0  2014-01-06 23:28  javacv-bin\samples\
     文件        9358  2012-10-06 16:51  javacv-bin\samples\BlackBalls.jpg
     文件        5275  2012-10-28 17:27  javacv-bin\samples\HoughLines.java
     文件       74611  2012-10-06 16:51  javacv-bin\samples\Rice.jpg
     文件       27267  2013-01-26 16:37  javacv-bin\samples\FaceRecognition.java
     文件        3494  2012-04-15 14:48  javacv-bin\samples\OpticalFlowTracker.java
     文件       11082  2012-08-22 20:57  javacv-bin\samples\FacePreview.java
     文件       16047  2013-05-19 13:17  javacv-bin\samples\RecordActivity.java
     文件       13160  2012-04-15 14:48  javacv-bin\samples\pic1.png
     文件       26766  2012-10-06 16:51  javacv-bin\samples\Shapes1.jpg
     文件        9047  2012-10-06 16:51  javacv-bin\samples\Blob2.jpg
     文件         340  2012-04-15 14:48  javacv-bin\samples\image1.png
     文件        4731  2012-10-06 16:51  javacv-bin\samples\Blob1.jpg
     文件       14481  2012-10-06 16:51  javacv-bin\samples\Blob3.jpg
     文件         341  2012-04-15 14:48  javacv-bin\samples\image0.png
     文件         478  2012-05-26 00:22  javacv-bin\samples\Faceapplet.jnlp
     文件        4361  2013-10-24 21:10  javacv-bin\samples\MotionDetector.java
     文件        5228  2012-05-30 22:27  javacv-bin\samples\Faceapplet.java
     文件         677  2012-05-25 23:44  javacv-bin\samples\Faceapplet.html
     文件       11370  2012-10-11 22:29  javacv-bin\samples\BlobDemo.java
     文件       17920  2012-10-06 16:51  javacv-bin\samples\Shapes2.jpg
     文件     1903104  2014-01-06 23:28  javacv-bin\javacv-linux-x86_64.jar
     文件     1810497  2014-01-06 23:15  javacv-bin\javacv-windows-x86_64.jar
     文件      160677  2014-01-06 22:51  javacv-bin\javacpp.jar
     文件     1352112  2014-01-06 23:18  javacv-bin\javacv-windows-x86.jar
     文件     1153428  2014-01-06 23:28  javacv-bin\javacv.jar
     文件     1775263  2014-01-06 23:25  javacv-bin\javacv-linux-x86.jar
     文件     3141247  2014-01-06 23:03  javacv-bin\javacv-android-arm.jar
............此处省略1个文件信息

评论

共有 条评论