<< Chapter < Page Chapter >> Page >
Students will implement histogram equalization on the Android platform. Concepts include color conversion, histograms, cumulative distribution functions, and tone mappings.

Lab overview

In this lab, you will create an Android application that performs histogram equalization on streaming video, and deploy it on the Google Nexus 7 tablet. You will input a video stream from the front-facing camera, equalize each frame of video, and then display the equalized video on the screen alongside the unprocessed video.

Part 1: setting up android and eclipse

After completing Lab 4, you should be familiar with the Android development process, and you should feel comfortable working with Eclipse and the Nexus 7. This includes understanding the difference between Java and native C code, being able to compile and run your code on the tablet, and using both the Java and C debuggers to troubleshoot your code.

If you are not familiar with all of the above concepts, go back to Lab 4 and read the relevant sections.
  1. Start Cygwin by double-clicking on C:\NvPack\cygwin\cygwin.bat
  2. In the prompt, navigate to the Eclipse folder by typing cd /cygdrive/c/NvPack/eclipse
  3. Launch Eclipse with ./eclipse

Once Eclipse opens, select File>Import...

  1. General>Existing Projects into Workspace
  2. V:\ece420\nexus\OpenCV - 2.4.5
  3. V:\ece420\nexus\Lab5\
  4. Check "Copy into Workspace"

Additionally, in Lab5 Project Properties>Android , remove the current reference to the OpenCV library, which should have a red check mark next to it, and add the library that is in your workspace.

The lab machines currently do not support Android 4.2.2. If your tablet has upgraded, you have two options:

  • Get a TA to roll back your OS to 4.1.2. See this link for instructions.
  • Develop on your own machine by installing the latest Nvidia Tegra Development Pack.

For this lab project, the build process in Eclipse has already been configured to build everything automatically, and so building your project is as simple as clicking Project>Build Project .

You may want to uncheck Build Automatically , and then build by first Clean ing the project and checking the "Immediately start build" option.

The first time you run the application, you will be asked to download the OpenCV Manager from the Play Store; make sure you are connected to the internet.

Running the demo now will only stream video in grayscale. Pressing the ... in the corner of the screen will bring up the options menu, allowing you to view the RGB or equalized image; you will implement these functionalities in Parts 2 and 3.

Part 2: color conversion

In this part, you will implement your own color-conversion algorithm. The purpose is to obtain a better understanding of different color spaces, along with becoming more comfortable with accessing multidimensional data in an environment other than MATLAB.

As discussed in the prelab, there is more than one way to represent the pixels in an image. We will be applying histogram equalization in a color space known as YUV. The Y channel encodes the luma component (brightness), and the U and V are the chroma (color) components. The equalized image will be displayed in RGB.

Questions & Answers

A golfer on a fairway is 70 m away from the green, which sits below the level of the fairway by 20 m. If the golfer hits the ball at an angle of 40° with an initial speed of 20 m/s, how close to the green does she come?
Aislinn Reply
cm
tijani
what is titration
John Reply
what is physics
Siyaka Reply
A mouse of mass 200 g falls 100 m down a vertical mine shaft and lands at the bottom with a speed of 8.0 m/s. During its fall, how much work is done on the mouse by air resistance
Jude Reply
Can you compute that for me. Ty
Jude
what is the dimension formula of energy?
David Reply
what is viscosity?
David
what is inorganic
emma Reply
what is chemistry
Youesf Reply
what is inorganic
emma
Chemistry is a branch of science that deals with the study of matter,it composition,it structure and the changes it undergoes
Adjei
please, I'm a physics student and I need help in physics
Adjanou
chemistry could also be understood like the sexual attraction/repulsion of the male and female elements. the reaction varies depending on the energy differences of each given gender. + masculine -female.
Pedro
A ball is thrown straight up.it passes a 2.0m high window 7.50 m off the ground on it path up and takes 1.30 s to go past the window.what was the ball initial velocity
Krampah Reply
2. A sled plus passenger with total mass 50 kg is pulled 20 m across the snow (0.20) at constant velocity by a force directed 25° above the horizontal. Calculate (a) the work of the applied force, (b) the work of friction, and (c) the total work.
Sahid Reply
you have been hired as an espert witness in a court case involving an automobile accident. the accident involved car A of mass 1500kg which crashed into stationary car B of mass 1100kg. the driver of car A applied his brakes 15 m before he skidded and crashed into car B. after the collision, car A s
Samuel Reply
can someone explain to me, an ignorant high school student, why the trend of the graph doesn't follow the fact that the higher frequency a sound wave is, the more power it is, hence, making me think the phons output would follow this general trend?
Joseph Reply
Nevermind i just realied that the graph is the phons output for a person with normal hearing and not just the phons output of the sound waves power, I should read the entire thing next time
Joseph
Follow up question, does anyone know where I can find a graph that accuretly depicts the actual relative "power" output of sound over its frequency instead of just humans hearing
Joseph
"Generation of electrical energy from sound energy | IEEE Conference Publication | IEEE Xplore" ***ieeexplore.ieee.org/document/7150687?reload=true
Ryan
what's motion
Maurice Reply
what are the types of wave
Maurice
answer
Magreth
progressive wave
Magreth
hello friend how are you
Muhammad Reply
fine, how about you?
Mohammed
hi
Mujahid
A string is 3.00 m long with a mass of 5.00 g. The string is held taut with a tension of 500.00 N applied to the string. A pulse is sent down the string. How long does it take the pulse to travel the 3.00 m of the string?
yasuo Reply
Who can show me the full solution in this problem?
Reofrir Reply
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Ece 420 fall 2013. OpenStax CNX. Sep 26, 2013 Download for free at http://cnx.org/content/col11560/1.3
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Ece 420 fall 2013' conversation and receive update notifications?

Ask