Miss Natalia

(14)

$20/per page/Negotiable

About Miss Natalia

Levels Tought:
Elementary,High School,College,University

Expertise:
Accounting,Business & Finance See all
Accounting,Business & Finance,Calculus,Computer Science,Environmental science,Health & Medical Hide all
Teaching Since: Apr 2017
Last Sign in: 269 Weeks Ago
Questions Answered: 6064
Tutorials Posted: 6070

Education

  • Doctor of Education in Educational Leadership with a Specialization in Educational Technology
    Phoniex University
    Oct-1999 - Nov-2005

Experience

  • HR Executive
    a21, Inc.
    Nov-1998 - Dec-2005

Category > Chemistry Posted 08 Jun 2017 My Price 5.00

What you need to do is to replace the four nested loops in the demo code by using kernel functions

For this project, you are to implement a prototype of "Photo Booth" by using different kernels for image filter. The input image is obtained directly from the web camera captured video. Your task is to apply different kernels triggered by hitting different keys on the keyboard:

(1) Hit "i" shows the original video

The "identical" kernel is [0 0 0; 0 1 0; 0 0 0]. Semi-colon ";" indicates a new row.

(2) Hit "g" shows the Gaussian blurred video

The "Gaussian" kernel is [1 2 1; 2 4 2; 1 2 1] * 1/16. 

(3) Hit "m" shows the mean/average blurred video

The " mean" kernel is [1 1 1; 1 1 1; 1 1 1] * 1/9.   

(4) Hit "e" shows the ordinary edge effect

The "edge" kernel is [-1 -1 -1; -1 8 -1; -1 -1 -1]

(5) Hit "v" shows the vertical edge effect by applying the Sobel filter

The vertical Sobel kernel is [-1 0 1; -2 0 2; -1 0 1]

(6) Hit "h" shows the horizontal edge effect by applying the Sobel filter

The horizontal Sobel kernel is [-1 -2 -1; 0 0 0; 1 2 1]

(7) Hit "s" shows the sharpen effect 

The sharpen kernel is [0 -1 0; -1 5 -1; 0 -1 0]. If the result is not obvious, you can change a bigger number than "5" for the center number, such as 7.

 

Hints:

You do not need to implement the filter from scratch. Instead, OpenCV provides you with a convenient filter API: "filter2D()". You just need to use this function directly and put two "Mat" variables as input with some other basic parameters. The two "Mat" variables refer to the input original image and the corresponding Kernel image. (please refer online document for further details: http://docs.opencv.org/modules/imgproc/doc/filtering.html#void filter2D(InputArray src, OutputArray dst, int ddepth, InputArray kernel, Point anchor, double delta, int borderType)"

You can start with the demo code for Gaussian blur posted as a basic framework. What you need to do is to replace the four nested loops in the demo code by using kernel functions. You are suggested to create a separate function, e.g. myEffect(Mat original_frame) or myEffect(). This function is called inside the while loop for every input video frame for effect processing. 

 

Rubrics:

(1) Successfully pass compilation or linkage (10%)

(2) Correctly stream the video from a webcam and display it. If "Esc" key is hit, the application terminates (20%)

(3) Correctly use "filter2D()" function with proper parameters passing (30%)

(4) Fully generate all the required effects with corresponding keyboard operations (40%)

 

Answers

(14)
Status NEW Posted 08 Jun 2017 07:06 AM My Price 5.00

Sol-----------uti-----------ons----------- fi-----------le ----------- He-----------llo----------- Si-----------r/M-----------ada-----------m -----------Tha-----------nk -----------you----------- fo-----------r y-----------our----------- in-----------ter-----------est----------- an-----------d b-----------uyi-----------ng -----------my -----------pos-----------ted----------- so-----------lut-----------ion-----------. P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I-----------

Not Rated(0)