Results 1 to 2 of 2
  1. #1
    shaungoater is offline Member
    Join Date
    Nov 2007
    Rep Power

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

  2. #2
    Nicholas Jordan's Avatar
    Nicholas Jordan is offline Senior Member
    Join Date
    Jun 2008
    Rep Power

    Default 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

  1. Replies: 2
    Last Post: 03-26-2010, 06:12 PM
  2. I need some advice and tips about my code...
    By sukatoa in forum Advanced Java
    Replies: 3
    Last Post: 06-23-2008, 08:29 PM
  3. Method Help
    By pringle in forum New To Java
    Replies: 4
    Last Post: 04-16-2008, 02:23 PM
  4. Replies: 2
    Last Post: 03-03-2008, 09:05 PM
  5. Prerequisite advice needed
    By Hatrabbit in forum New To Java
    Replies: 2
    Last Post: 11-30-2007, 05:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts