Recherche avancée

Médias (0)

Mot : - Tags -/clipboard

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (15)

  • Qu’est ce qu’un éditorial

    21 juin 2013, par

    Ecrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
    Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
    Vous pouvez personnaliser le formulaire de création d’un éditorial.
    Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Déploiements possibles

    31 janvier 2010, par

    Deux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
    L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
    Version mono serveur
    La version mono serveur consiste à n’utiliser qu’une (...)

Sur d’autres sites (2491)

  • Using OpenCV on 32-bit XP

    14 novembre 2016, par Aleksandar Rakić

    Is it possible to run OpenCV version 3.0.0 on 32-bit XP ?

    I have successfully compiled code on Win 8.1 64-bit platform but it won’t run on the other computer.

    The code I run is below (it’s only for testing purposes)

    package opencvtest;

    import java.awt.Image;
    import java.awt.image.BufferedImage;
    import java.awt.image.DataBufferByte;
    import javax.swing.ImageIcon;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import org.opencv.core.*;
    import org.opencv.videoio.VideoCapture;
    import org.opencv.videoio.Videoio;

    public class OpenCVtest {


     private JFrame frame;
     private JLabel imageLabel;

    public static void main(String[] args) {
       OpenCVtest app = new OpenCVtest();
       app.initGUI();
       app.runMainLoop(args);
     }

     private void initGUI() {
       frame = new JFrame("Camera Input Example");  
       frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);  
       frame.setSize(400,400);  
       imageLabel = new JLabel();
       frame.add(imageLabel);
       frame.setVisible(true);      
     }

     public static BufferedImage bufferedImage(Mat m) {


       int type = BufferedImage.TYPE_BYTE_GRAY;
       if (m.channels() > 1) {
           type = BufferedImage.TYPE_3BYTE_BGR;
       }
       BufferedImage image = new BufferedImage(m.cols(), m.rows(), type);

       m.get(0, 0, ((DataBufferByte)image.getRaster().getDataBuffer()).getData());
       return image;

     }

     private void runMainLoop(String[] args) {
       //ImageProcessor imageProcessor = new ImageProcessor();
       System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
       System.out.println("Welcome to OpenCV version " + Core.VERSION);
       Mat webcamMatImage = new Mat();
       System.out.println("Mat " + webcamMatImage);
       Image tempImage;
       VideoCapture capture = new VideoCapture("Highway.mp4");
       System.out.println("Capture " + capture);
       if(!capture.isOpened()){
           System.out.println(capture.open("D:\\AleksandarRakic\\Java Projects\\mavenproject1\\Highway.mp4")?"Otvorio":"Nije otvorio");
       }
       capture.set(Videoio.CAP_PROP_FRAME_WIDTH,320);
       capture.set(Videoio.CAP_PROP_FRAME_HEIGHT,240);

       if( capture.isOpened()){  
           while (true){  
               capture.read(webcamMatImage);
                   if( !webcamMatImage.empty() ){
                       int type = BufferedImage.TYPE_BYTE_GRAY;
                       if (webcamMatImage.channels() > 1) {
                           type = BufferedImage.TYPE_3BYTE_BGR;
                       }
                       BufferedImage image = new BufferedImage(webcamMatImage.cols(), webcamMatImage.rows(), type);

                       webcamMatImage.get(0, 0, ((DataBufferByte)image.getRaster().getDataBuffer()).getData());

                       tempImage= image;
                       ImageIcon imageIcon = new ImageIcon(tempImage, "Captured video");
                       imageLabel.setIcon(imageIcon);
                       frame.pack();  //this will resize the window to fit the image
                   }  
                   else{
                       System.out.println(" -- Frame not captured -- Break!");
                       break;  
                   }
           }
       }
       else{
           System.out.println("Couldn't open capture.");
       }
     }

    }

    When I run it on XP, VideoCapture constructor fails to open the video designated. From my understanding, opencv uses it’s own ffmpeg .dll as a codec. Is this true ?

    If not, is it using the codec I have from K-Lite cp ?

    Finally, could anything else be wrong ?

    My %path% variable contains the locations to opencv_ffmpeg300.dll and openvc_java300.dll on WinXP. I also added the following to NetBeans run parameter

    -Djava.library.path="C :\opencv\build\x86\vc12\bin ;C :\opencv\build\java\x86"

  • Qt 5.2 / OpenCV 2.4.8 - Can’t open video files via VideoCapture

    4 août 2015, par Zamahra

    I have a big problem that i can’t solve by myself. OpenCV itself works fine, but i’m not able to load videos. Here’s my code :

    PRO- File

    QT       += core gui

    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

    TARGET = videoredux
    TEMPLATE = app

    INCLUDEPATH += C:/OpenCV/opencv_bin/install/include
    LIBS += -LC:\\OpenCV\\opencv_bin\\bin \
       libopencv_core248d \
       libopencv_highgui248d \
       libopencv_imgproc248d \
       libopencv_features2d248d \
       libopencv_calib3d248d \
       libopencv_video248d \


    SOURCES += main.cpp\
           mainwindow.cpp

    HEADERS  += mainwindow.h

    FORMS    += mainwindow.ui

    and the MainWindow Class :

    #include "mainwindow.h"
    #include "ui_mainwindow.h"
    #include <qfiledialog>
    #include <iostream>
    #include
    #include <opencv2></opencv2>core/core.hpp>
    #include <opencv2></opencv2>highgui/highgui.hpp>
    #include <opencv2></opencv2>imgproc/imgproc.hpp>
    #include <opencv></opencv>cv.h>


    MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
    {
       ui->setupUi(this);
       ui->videoStatusLabel->setText("Kein Video geladen.");

       // SIGNALS &amp; SLOTS

       QObject::connect(ui->chooseVideoButton,SIGNAL(clicked()),
                    this,SLOT(chooseVideo()));
       QObject::connect(ui->startButton,SIGNAL(clicked()),
                    this,SLOT(startProcess()));

    }

    void MainWindow::chooseVideo(){

       QString fileName = QFileDialog::getOpenFileName(this,
            tr("Open Video"), "/home", tr("Video Files (*.avi *.mp4 *.mpeg *.mpg)"));
       qDebug() &lt;&lt; "Path:" &lt;&lt; fileName;
       ui->videoStatusLabel->setText(fileName);
    }

    void MainWindow::startProcess(){
       QString videoPath = ui->videoStatusLabel->text();
       QFileInfo video(videoPath);
       if(video.exists()){
           const std::string path = videoPath.toUtf8().constData();
           cv::VideoCapture capture(path);
           cv::Mat frame;

           if(!capture.isOpened()){
               qDebug() &lt;&lt; "Error, video not loaded";
           }

           cv::namedWindow("window",1);
           while(true)
           {
               bool success = capture.read(frame);
               if(success == false){
                   break;
               }
               cv::imshow("window",frame);
               cv::waitKey(20);
           }
           cv::waitKey(0);
       }
       else{
           qDebug() &lt;&lt; "Error, File doesn't exist";
       }
    }
    </iostream></qfiledialog>

    The paths are correct, I tried many different video formats but he never loads the videos. I’m running Qt on a Windows 8 machine and i have “K-Lite Codec Pack 10.2.0 Basic” and ffmpeg installed. The videos are playing properly with my video players. I also tried to copy the .dll to the working directory, searched for opencv dll’s in the system32 directory and rebuild OpenCV with mingw on this computer. I know that many people have the same problems, but none of their suggestions solved it. Does anyone know how to solve this problem ?

    Thank you very much !

    Nadine

    ----UPDATE---- I still can’t open video files, so I programmed the application on a Windows7 64-Bit system. It worked fine, but when I try to open the application on a Windows8 computer it still can’t open the file. It doesn’t matter which codecs are installed, because it generally runs on every Windows7 computer and fails on every Windows8 computer.. The same for older OpenCV-Versions. Is there a general problem with OpenCV and Windows8 ?

  • Qt 5.2 / OpenCV 2.4.8 - Can’t open video files via VideoCapture

    21 février 2014, par Zamahra

    I have a big problem that i can’t solve by myself. OpenCV itself works fine, but i’m not able to load videos. Here’s my code :

    PRO- File

    QT       += core gui

    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

    TARGET = videoredux
    TEMPLATE = app

    INCLUDEPATH += C:/OpenCV/opencv_bin/install/include
    LIBS += -LC:\\OpenCV\\opencv_bin\\bin \
       libopencv_core248d \
       libopencv_highgui248d \
       libopencv_imgproc248d \
       libopencv_features2d248d \
       libopencv_calib3d248d \
       libopencv_video248d \


    SOURCES += main.cpp\
           mainwindow.cpp

    HEADERS  += mainwindow.h

    FORMS    += mainwindow.ui

    and the MainWindow Class :

    #include "mainwindow.h"
    #include "ui_mainwindow.h"
    #include <qfiledialog>
    #include <iostream>
    #include
    #include <opencv2></opencv2>core/core.hpp>
    #include <opencv2></opencv2>highgui/highgui.hpp>
    #include <opencv2></opencv2>imgproc/imgproc.hpp>
    #include <opencv></opencv>cv.h>


    MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
    {
       ui->setupUi(this);
       ui->videoStatusLabel->setText("Kein Video geladen.");

       // SIGNALS &amp; SLOTS

       QObject::connect(ui->chooseVideoButton,SIGNAL(clicked()),
                    this,SLOT(chooseVideo()));
       QObject::connect(ui->startButton,SIGNAL(clicked()),
                    this,SLOT(startProcess()));

    }

    void MainWindow::chooseVideo(){

       QString fileName = QFileDialog::getOpenFileName(this,
            tr("Open Video"), "/home", tr("Video Files (*.avi *.mp4 *.mpeg *.mpg)"));
       qDebug() &lt;&lt; "Path:" &lt;&lt; fileName;
       ui->videoStatusLabel->setText(fileName);
    }

    void MainWindow::startProcess(){
       QString videoPath = ui->videoStatusLabel->text();
       QFileInfo video(videoPath);
       if(video.exists()){
           const std::string path = videoPath.toUtf8().constData();
           cv::VideoCapture capture(path);
           cv::Mat frame;

           if(!capture.isOpened()){
               qDebug() &lt;&lt; "Error, video not loaded";
           }

           cv::namedWindow("window",1);
           while(true)
           {
               bool success = capture.read(frame);
               if(success == false){
                   break;
               }
               cv::imshow("window",frame);
               cv::waitKey(20);
           }
           cv::waitKey(0);
       }
       else{
           qDebug() &lt;&lt; "Error, File doesn&#39;t exist";
       }
    }
    </iostream></qfiledialog>

    The paths are correct, I tried many different video formats but he never loads the videos. I’m running Qt on a Windows 8 machine and i have “K-Lite Codec Pack 10.2.0 Basic” and ffmpeg installed. The videos are playing properly with my video players. I also tried to copy the .dll to the working directory, searched for opencv dll's in the system32 directory and rebuild OpenCV with mingw on this computer. I know that many people have the same problems, but none of their suggestions solved it. Does anyone know how to solve this problem ?

    Thank you very much !

    Nadine

    ----UPDATE---- I still can't open video files, so I programmed the application on a Windows7 64-Bit system. It worked fine, but when I try to open the application on a Windows8 computer it still can't open the file. It doesn't matter which codecs are installed, because it generally runs on every Windows7 computer and fails on every Windows8 computer.. The same for older OpenCV-Versions. Is there a general problem with OpenCV and Windows8 ?