<< 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

explain the basic method of power of power rule under indices.
Sumo Reply
Why is b in the answer
Dahsolar Reply
how do you work it out?
Brad Reply
answer
Ernest
heheheehe
Nitin
(Pcos∅+qsin∅)/(pcos∅-psin∅)
John Reply
how to do that?
Rosemary Reply
what is it about?
Amoah
how to answer the activity
Chabelita Reply
how to solve the activity
Chabelita
solve for X,,4^X-6(2^)-16=0
Alieu Reply
x4xminus 2
Lominate
sobhan Singh jina uniwarcity tignomatry ka long answers tile questions
harish Reply
t he silly nut company makes two mixtures of nuts: mixture a and mixture b. a pound of mixture a contains 12 oz of peanuts, 3 oz of almonds and 1 oz of cashews and sells for $4. a pound of mixture b contains 12 oz of peanuts, 2 oz of almonds and 2 oz of cashews and sells for $5. the company has 1080
ZAHRO Reply
If  , , are the roots of the equation 3 2 0, x px qx r     Find the value of 1  .
Swetha Reply
Parts of a pole were painted red, blue and yellow. 3/5 of the pole was red and 7/8 was painted blue. What part was painted yellow?
Patrick Reply
Parts of the pole was painted red, blue and yellow. 3 /5 of the pole was red and 7 /8 was painted blue. What part was painted yellow?
Patrick
how I can simplify algebraic expressions
Katleho Reply
Lairene and Mae are joking that their combined ages equal Sam’s age. If Lairene is twice Mae’s age and Sam is 69 yrs old, what are Lairene’s and Mae’s ages?
Mary Reply
23yrs
Yeboah
lairenea's age is 23yrs
ACKA
hy
Katleho
Ello everyone
Katleho
Laurene is 46 yrs and Mae is 23 is
Solomon
hey people
christopher
age does not matter
christopher
solve for X, 4^x-6(2*)-16=0
Alieu
prove`x^3-3x-2cosA=0 (-π<A<=π
Mayank Reply
create a lesson plan about this lesson
Rose 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