i need some help in understanding the following codes.thanks..

i need some help in understanding the following codes.thanks..

this code is to perform LocalColorHistogram.But i can't understand it

public Vector<Double> getFeatureVector(int[] inImg, int height, int width, int[] maskImg, int flag, double feature, int featureDimension) { int gridCount = 4; int row = gridCount * gridCount; Vector<Double> localColorHistogram = new Vector<Double>(row * 64); int size = width * height; int i = 0; int j = 0; int k = 0; double[][] histogram = new double[row][64];

    for(i=0 ; i<row ; i++){
        histogram[i] = new double[64];
        for(j=0 ; j<64 ; j++){
            histogram[i][j] = 0.0d;
        }
    }
    for(i=0 ; i<size ; i++){
        k = (inImg[i]>>18 & 0x30) | (inImg[i]>>12 & 0xc) | (inImg[i]>>6 & 0x3);
        j = getGrid(i, width, height, gridCount);
        histogram[j][k] += 1.0;
    }
    for(i=0 ; i<gridCount ; i++)
        for(j=0 ; j<64 ; j++)
            localColorHistogram.add(round(((double)histogram[i][j]/(size/gridCount))));
    histogram = null;
    return localColorHistogram;

}
private int getGrid(double j, double width, double height, int gridCount){
    double localWidth = width/gridCount;
    double localHeight = height/gridCount;
    int cell = (int)(j/width/localHeight)*gridCount + (int)((j % width)/localWidth);
    return cell;
}
View Answers









Related Tutorials/Questions & Answers:
i need some help in understanding the following codes.thanks..
i need some help in understanding the following codes.thanks..  this code is to perform LocalColorHistogram.But i can't understand it public... * height; int i = 0; int j = 0; int k = 0; double
Need some help urgently
Need some help urgently  Can someone please help me with this below question. I need to write a class for this. If you roll Y standard six-sided dice... number of possible combinations.   The actual question got some error. Its
Advertisements
hello there i need help
hello there i need help  : i need to do a program like... i am a beginner, and aside from that i am really eager to learn java please help me with the codes and please explain to me how it works. i only need to use
i need a help in this please
i need a help in this please  The factorial of a nonnegative integer n is written n! (pronounced â?? n factorialâ??) and is defined as follows: n!=n...=input.nextInt(); long num=m; for(int i=m;i>1;i
I have need to help
I have need to help  Write a program that, for four points A, B, C and P, draws a triangle formed by ABC and a small cross showing the position of P; and displays a line of text indicating which of the following three cases
PLZ Need some help JAVA...HELP !!
PLZ Need some help JAVA...HELP !!  Create a class names Purchase Each purchase contains an invoice number, amount of sale and amount of sales tax. Include set methods for the invoice number and sale amount. Within the set
Need some help creating an order form.
Need some help creating an order form.  Hi there. I am looking to create an order form for clients to customize the way a product looks. The codes I found on the form html page are useful. My question is: can I tie them all
i need help to solve this problem
i need help to solve this problem  Write a stack class... after perform each of the following sequence of events: a. start with an empty.... H and I join the queue h. G leaves the queue i. H and I leave the queue
i need help - Development process
i need help  hello, i need help regarding this program. public...()); } } } it is printing the result of ping in to a file,but if i want... the result in to the files,if i want to do this i must make my program running
i need help - Development process
i need help  hello, i need help regarding this program. this program... IPAddress on command line, but i want to take it dynamically and it must store...?   hi subhash hope this code can help you, public class PingTest
i need help plz .... Quickly
i need help plz .... Quickly   how can i count how many numbers enterd by the user so the output would be like this Total number of Scores = .... this is my code :- (adsbygoogle = window.adsbygoogle || []).push
Java Question Anyone need some HELP !!
Java Question Anyone need some HELP !!  Create a file that contains... of the two files. Note: For the above code, you need POI api. import... zip file from the following link: http://download.nextag.com/apache/poi/release
pls i need help with my assignment
pls i need help with my assignment  how to write a code that ask the user for the height of the triangle and prints the triangle using * eg if height is 3 it prints * and also using import java.util.Scanner
PLZ Need some help on the 2nd part of this question...Someone please help !!!!
PLZ Need some help on the 2nd part of this question...Someone please help !!!!  write an application that displays a menue of three items in a restaurant as follows: 1.Cheeseburger 4.99 2.Pepsi 2.00 3.Chips 0.75 prompt the user
PLZ HELP ME. i need php code.
PLZ HELP ME. i need php code.   I want php code for bellow OUTPUT. output is just example but it must be letters only. abc bcd efg jku rgt azs hje qqc wws adt
really need help on how to write this program plz some 1 help out. - Java Beginners
really need help on how to write this program plz some 1 help out.  i am confused here on what to write can some 1 help out here i dont quite understand how to code it so can some 1 help out. Part II Write, compile and execute
need help pleaseee....i weak in java
need help pleaseee....i weak in java  QUESTION 1 You are required... to develop the above system by following the steps below: a) Prompt the user...) Separate them as either R/r for Residential or I/i for Industrial. You can use
i need your help - Java Interview Questions
i need your help  Write a java program that: i. Allows user to enter 2 numbers from the keyboard ii. Uses a method to compare the two numbers... than the other.   Hi Friend, Try the following code: import
I need your help - Java Beginners
I need your help  What is the purpose of garbage collection in Java, and when is it used?  Hi check out this url : http://www.artima.com/insidejvm/ed2/gc.html http://java.sun.com/javase/technologies/hotspot
I need help in doing this. - Java Beginners
I need help in doing this.  Student DataBase i will need creating..., and the student's GPA.using arrays and objects, need to structure the information... objects that will house the birthdates for each student member. (I have
I need your help - Java Beginners
I need your help  For this one I need to create delivery class.... Keep prompting the user for each of the following values until they are valid... to describe the purpose of the program.   Hi Friend, Try the following
this is my javascript code and i am not understanding the mistake in this,please help me?
this is my javascript code and i am not understanding the mistake in this,please help me?  <html> <h2>Form Validation</h2> <script language = "Javascript"> function checkEmail
I want to build sessionfactory in hibernate 4. Need help.
I want to build sessionfactory in hibernate 4. Need help.  Hello, I want to build sessionfactory in hibernate 4. Need help
in my project, i have to add scrollbars to a panel,. i need some example on it,how to doit.
in my project, i have to add scrollbars to a panel,. i need some example on it,how to doit.  in my project, i have to add scrollbars to a panel,. i need some example on it,how to doit. Thanks In Advance   Please
i need latest oracle certified java dumps.. Pleas help me?
i need latest oracle certified java dumps.. Pleas help me?  i need latest oracle certified java dumps.. Pleas help me
Need help
Need help  Hello... I need some help I have a method which contains 1 string value and i wnat when this method get called den that string value should b assigned as array name.. for example.. i have a method name() which
Need help
Need help  Hello... I need some help I have a method which contains 1 string value and i wnat when this method get called den that string value should b assigned as array name.. for example.. i have a method name() which
( Inheritance, Polymorphism, Overriding)i need help - Java Beginners
( Inheritance, Polymorphism, Overriding)i need help  Advanced Concepts with Classes( Inheritance, Polymorphism, Overriding) i need help to create this application,than you Employees in a company are divided into the classes
in my project, i have to add only vertical scrollbar to a panel,but not horizontal scrollbar. i need some example on it,how to doit.
in my project, i have to add only vertical scrollbar to a panel,but not horizontal scrollbar. i need some example on it,how to doit.  in my project.... i need some example on it,how to doit. Thanks in advance
i am confused here on what to write can some 1 help out here - Java Beginners
i am confused here on what to write can some 1 help out here  i don't quite understand how to code it so can some one help out
hi .. need help ASAP ..i have a project buit in eclipse , i have installed jasper. i want the steps to work on it ..
hi .. need help ASAP ..i have a project buit in eclipse , i have installed jasper. i want the steps to work on it ..   hi .. need help ASAP ..i have a project buit in eclipse , i have installed jasper. i want the steps to work
Need help
Need help  Dear sir, I have a problem. How to write JSP coding, if a user select a value from drop down list for example department, the another drop.... This name list should get from the database. Please help me. By the way, I'm
I really need help with this assignment question Please help me out Please
I really need help with this assignment question Please help me out Please ... in MySQL. For this purpose you will need to use the sheridancollege database we...?. The LaptopPool table should contain the following fields: StudentID, FirstName
Need help with this!
Need help with this!  Can anyone please help me... to effectivly end the loop with out the need to break it. for(i=(0); i <... to a file at all at this time. Any help would be greatly appreciated, thank you
I need help on my Java code.... please please help me out!?
I need help on my Java code.... please please help me out!?  Well my... the anagram on screen or the output file! Please show me whats wrong. Thanks i need a part of the code thats fixed if possible! Heres is the code: import
Need the some guidence - Spring
Need the some guidence  Hi, MY name is pavan iam having mini projects in MCA these are the details reg projects below 1.project name:identical...; Hi pavan, I show your posted question but not not clear so can
need a java program for the following
need a java program for the following  Write a java program with three horizontal sliders. Name the sliders, the first one as red, the second one as green and the third one as blue. You design the program such that on varying
Need the Following MobileApplication Related Code
Need the Following MobileApplication Related Code  Hi, I need java coding for the following requirements in Collections.. Mobile Subscriber name...: and one Daemon Thread class need's to run while doing the above operations and if you
Need Help on JMS - JMS
Need Help on JMS   Hi, In my application i need to create my own ques and my own QueueConnectionFactory..... Plz tell me how to create the same... Any help is appriciated,.. Thanks in advance
Need Help - Java Beginners
Need Help  Hello Sir, Am a beginner of Java. Also i did course on J2EE... but dont have any ideas about real time projects. But i want to do some projects in Java as well as J2EE... Can u help me and guide to do a project
Need help with nested queries
Need help with nested queries  Hello, Table1 has "id", "votes" columns. Table2 has "id", "Name" column. I need to retrieve Name and its corresponging Votes. I tried with nested queries but its confusing. Can anyone please help
need help please
need help please  Dear sir, my name is logeswaran. I have a big problem that I can't find the solution for a program. How can I block a user from enter a page second time. Please help me. By the way I'm using Access database
need help to create applet
need help to create applet  Can u help me..?? I get a task ...and i dont know how to make it... So I hope that u can help me... Here is the task... e) CardLayout If u can help me, then please
Need help on JAVA JSP
Need help on JAVA JSP  Hi, I have never worked on java and I have been given an assignment where I have to fix existing issues in the tool(created...(need to know how I can adjust it based on the cureen system's screen resolution
Need Help on the script
Need Help on the script  hello there, My name is Femi and am a web developer using php. am working on a project. and am having some difficulties. i dont know if you can help me out with it. The platform am building will receive
need help - Java Beginners
need help  Need help in programming in Java  Simple java...();DISPLAYING OUPUT " * " ," *** " ........I used System.out.print('"'); statement before System.out.print("*"); statement and I used
Friends need a help on ruby..
Friends need a help on ruby..  Friends i need a ruby script and the requirement is When i am running a ruby script in cmd, after executing my script, a html report will be generated having my console output details. For ex
I need to develop a gui like this
field Gained focus. then the list appear with some string values...someone please help me   sorry goes through this link I need to develop like...I need to develop a gui like this  Hai Friends, I need to develop
Need help - Java Beginners
; Hi Friend, Please try the following code. We hope that this code will help...Need help   To Write a Java program that asks the users to enter a m... . Then, write a class with the following three methods: - Method 1 accepts the m * n
I need an example of sessionfactory
I need an example of sessionfactory  Hi, I need an example of session factory in hibernate. If you can provide me one with, that would be great...Thanks

Ads