Results 1 to 2 of 2
Thread: Advice on best method for....
- 01-22-2008, 07:45 PM #1
Member
- Join Date
- Nov 2007
- Posts
- 13
- Rep Power
- 0
Advice on best method for....
i am working on a program to analyze images and then use this to find similar images etc. I want to break the image down into a 3*3 grid then within each section 3*3 again. Would it be best to have a method to break the image down to the first 9 parts and then use recursion to call the method again for each of the 9 parts (would this cause difficulty's in storing the data?). Or would it be better to write methods to retrieve data for all 81 parts at the lowest level then combine the low level data to get data on the larger sections. nb i want to store rgb info for the 9 parts and the 9 parts within each of the original parts of the 3*3 grid. Any help is much appreciated.
- 06-23-2008, 08:36 PM #2
Look in the tips.
I just saw a workup in the tips yesterday, there seems to be a slew of them posted all at once. The tip shows how to getBytes() for a graphic. We then have a Algorithmic challenge on how the [][] is split. My first idea is to test if (([].size() % 3)!= 0x0000)
That is to determine if there is a partial to be fitted into a modular three. The next thing that comes to mind is that if we want to get to 3x3 every time, we just divide by 3 to get a row and column count. Additionally, from experience - either check for zero before divide or trap it with exception handling. You may assign a default value in the catch if that is easier than dealing with help department:
catch( divide by zero ){ int val = saneDefault;}
Program will then continue to run minus weekend ruiners.
Similar Threads
-
method not abstract, does not override actionperformed method.
By Theman in forum New To JavaReplies: 2Last Post: 03-26-2010, 06:12 PM -
I need some advice and tips about my code...
By sukatoa in forum Advanced JavaReplies: 3Last Post: 06-23-2008, 08:29 PM -
Method Help
By pringle in forum New To JavaReplies: 4Last Post: 04-16-2008, 02:23 PM -
Want Some Expert Advice? JAX India 2008 Might Be the Right Place
By james in forum Java SoftwareReplies: 2Last Post: 03-03-2008, 09:05 PM -
Prerequisite advice needed
By Hatrabbit in forum New To JavaReplies: 2Last Post: 11-30-2007, 05:38 PM
Bookmarks