What you need to do is to replace the four nested loops

Assignment Help Programming Languages
Reference no: EM131993127

Question: 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.

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.

Reference no: EM131993127

Questions Cloud

Breakthrough in the science of genetics : On June 26, 2000, two groups of scientists announced a breakthrough in the science of genetics.
Was he or she effective in leading you as part of the team : DeRue, Barnes, and Morgeson (2010) found that team leadership style effectiveness depended on the level of charisma exhibited by the leader.
Great deal of humor into candide : As a writer, Voltaire had serious political and philosophical goals. He also, however, incorporates a great deal of humor into Candide.
Analyze the reasons for the variation of growth rates : BUECO 1509 - Federation University Australia - Critically analyze the reasons for the variation of growth rates in that time period about 1200 words
What you need to do is to replace the four nested loops : 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.
Company issues stocks and or bonds to investors : Market value of equity is always higher than book value of equity. In the primary market, the company issues stocks and/or bonds to investors.
How did the closeness influence the care you provided : Assignment - Reflection of your clinical experiences. Case Study: 'We have to be real as nurses. How did the closeness influence the care you provided
Develop an incident response plan : Assume that you have been tasked by your employer to develop an incident response plan. Create a list of stakeholders for the IR planning committee.
Analyze the style of the first paragraph : Analyze the style of the first paragraph. How does it set the tone for the rest of the story?

Reviews

Write a Review

Programming Languages Questions & Answers

  Describe at least one feature of object-oriented programming

Describe at least one feature of object-oriented programming that Visual Logic lacks. Identify at least one advantage to using event-driven programming, as compared to using purely procedural programming.

  Program to read information from keyboard

Write a C++ program that reads the following information from the keyboard terminated with the sentinel -999 in the Student Number, and stores the records in arrays (3 separate arrays).

  Design the array to do letter count for letters in alphabet

Design the array of 26 components to do letter count for 26 letters in alphabet and a variable for line count. (You may wish to call these variables letterCount and lineCount respectively.)

  Write recursive function to take list head pointer

Write down the recursive function which takes list head pointer as parameter and returns largest value in linked list. Recall that xy = (xy/2)2 if y is even. Use this to write function which calculates xy.

  Derive a recursive solution to the problem

CPSC 6109: Advanced Algorithms Prove that the problem to compute the LMIS exhibits optimal substructure.and Derive a recursive solution to the problem

  How you may be able to pass variables in your program

Describe in detail how you may be able to pass variables in your program and elaborate with code-specific syntax as to the required keywords for each of the different ways to pass variables in your program

  Write a method named maxelement

Write a method named maxElement, which returns the largest value in an array that is passed as an argument. The method should use recursion to find the largest element. Demonstrate the method in a program.

  Prepare a assignment in sql

Prepare a assignment in SQL. To create two table names (not in use employee ,product ,order )- Separate queries of all function,screen shots and queries.

  Create a simple bank account simulation

Create a new project named "Accounts" and a new source file named "accounts.c". Enter the following skeleton program. The main() function has been implemented for you. There are four functions you will need to implement to complete the lab.

  Program for a computer dating service

Write a program for a computer dating service. Each client gives you his or her name, phone number, and a list of interests.

  Create the circle moving program using the new language

Create the circle moving program using the new language, and your reference sheet - Process Events needs to be called once each event loop to update SwinGame with the actions that have occurred since the last time through the loop.

  Create a utility procedure

Sum of Digits in a String. It is necessary to create a utility procedure that allows you to convert from a character to an integer value to allow you to sum the values of the digits in a string

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd