Giter VIP home page Giter VIP logo

video's Introduction

Video Component

Usage of the API

int main() {

        /* creates a new object device1 */
        initCapture device1;                             

        /* Read Camera settings from kernel  */
        ReadCameraSettings(&device1);                               

        /* Initialise Camera and opens it  */
        initCamera(&device1);                                           

        /* Captures frame and save it into memory  */
        CaptureFrame(&device1);     

        Mat image=FrametoMem(&device1);                   

        /* Saves frame to disk */        
        CaptureFrametoDisk(&device1);  
    
        /* Displays the image to a new window named "Name" */
        DisplayImage("Name",image);                     

        return 0;
}

Psuedo codes and flowcharts for the functions and code

1. loadJsonConfig()

This function Parse and store JSON document into global variable

Flowchart

Psuedo code
    initialise a var ret = -1 for returning
    Open the config.json file in read mode
    
    if file is not empty{
        
        Declare readbuffer
        Declare stream for reading the config file
        Parse config.json and store it in config global var
        Store the result in ok
        
        if it is empty{
            Print the JSON parse error
            
        end
        }
        
        set ret = 0;
        
     end
    }
    
    else if file is empty{
        
        Print Error in reading JSON file
    end
    }
    
    
    close the file
    return -1 
    
    end
2. ListActiveCamera()

This Function Prints out all the available device

It Uses <glob.h> and <unistd.h> libraries to do so

Flowchart

3. initCamera()

It Initialises the camera by opening it's location and returns the following integer variable i.e.fd

Flowchart

4. ReadCameraSettings()

This function Prints out the Settings of the device entered by user which is stored in the respective Object in the main function

Flowchart

5. CaptureFrame()

This function Starts the following device and captures a frame and store it into Memory

Flowchart

6. CaptureStreamtoMem()

This function Parse and store JSON document into global variable

Flowchart

7. CaptureFrametoDisk()

This function Saves the frame into Disk

Flowchart

8. CaptureStreamtoDisk()

This function Saves the Stream into Disk

Flowchart

9. DisplayImage()
Flowchart

Info about the config.json file

It contains The Device Number

video's People

Contributors

dbdibyendu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.