CS6825: Computer Vision word cloud
Main
Data Input
Research
Getting Started
Blob Detecton
Proposal
Implementation
Requirements
Data Output
Class and Menu Specifications
Other
Deliverables

Project 3: Feature Detection

    Program Data Classes and Menu Specifications

    (you are required to use these names and structures). NOTE: you may choose to add more elements to these classes....they are not necessarily complete but, contain some beginning ideas to get you started and keep you structurd.

    FeatureDetectionProgram

    Name of class that is the main program for Feature Extraction

     

    Menus of FeatureDetectionProgram

    • File->Open: opens image to be processed. Loads data into class ActiveImage (see Project 2 specifications)
    • File->Save As: saves the current image into a user specified location (see Project 2 work you did)
    • File->Exit: exits the program
    • Process->Feature Detect: runs the blob detection and then the approriate feature detection algorithms (5) on each blob producing BlobList which is vectors containing instances of Blob. Also, saves Blob.xml XML file
    • List->Blobs : displays BlobList in a nice format in a window (scrollable) in the program

    CancerAnalysis Class Psuedocode

    This is a class that contains the BlobList and references to the Image , etc.

         class CancerAnalysis{

    ImageClass image; //pointer to the Image being processed

    Vector BlobList;   //vector containing instances of Blob classit

          }

    Blob Class Psuedocode

     

         class Blob {

    int ID; //unique ID indicating this blob

    Location location; //indicates location
    Area area; //indicates area feature encompasses

    Feature1 f1;

    Feature2 f2;

    Feature3 f3;

    Feature4 f5;


           }

    Feature Class Psuedocode

         class Feature {

    String name; // descriptive name (i.e. texture
    Location location; //indicates location
    Area area; //indicates area feature encompasses
    int certainty; //number from 0 to 100
    float importance; //indicates importance from 0 to 1.0

     

     

    //method to return XML formated information:
    void to_XML(int i){

         String s = "<feature" + i + ">";
          //you finish the rest to produce xml as described previous...
          //this method only returns name, location, area,certainty, importance
    }

     

    //method to return String formated information:
    void to_String(int i){

         String s = "Feature " + i + ": " + this.description;
          //you finish the rest to produce nice string for display in program...
          //this method only returns name, location, area,certainty, importance
    }
     
    }

    Feature1 Class Psuedocode (will have similar for Feature2,Feature3,Feature4 and Feature5)

         class Feature1 extends Feature {

    //now add your own pieces of info that describes THIS feature-
    // i.e
    info1,info2, info3 you saw above in the XML

    ........

    //constructor
    Feature1() {

         this.description="XXXXX";// you fill in
         //whatever else you need in your constructor
    }

    //method to return XML formated information..
    //return as a string to print out or use javax.xml
    String to_XML(){
        super.to_XML(1); //calls parent method

        //you create XML for YOUR feature 1
    }

    //method to return String formated information:
    String to_String(){
        super.to_String(1); //calls parent method

        //you create String for YOUR feature 1
    }

    //other methods you need???

         }

    Location Class Psuedocode

         class Location {

    Point Start, End; //may have a start location and end location

    Point Center; //may have a center location

    void setStart(int row, int col) {
              this.Start.x = row;
              this.Start.y = col;
    }

    void setEnd(int row, int col) {
              this.End.x = row;
              this.End.y = col;
    }

    void setCenter(int row, int col) {
              this.Center.x = row;
              this.Center.y = col;
    }

    //add methods as you wish like get*() methods

          }

    Area Class Psuedocode

         class Area {

    Point UpperLeft, LowerRight; //locations of bounding box

    int width, left; //dimensions of bounding box

    Vector Pixels; //create vector of Point object that are
                          
    //given array of Point objects representing pixels Point.x = row,
    //Point.y=column in this area set them in Pixels array
    setPixels(Point PointArray){

            for(int i=0; i<PointArray.size(); i++)
                 this.Pixels.add(PointArray[i]);
    }

    Note: reuse ImageClass you created in Project 2.

    IMPORTANT: add 2 methods to the ImageClass you created called

    //if using ROI - then add location and dimensions of the ROI here

    //method to return XML formated information..
    //return as a string to print out or use javax.xml
    String to_XML() {  
          /*compose string that looks like

         <image filename="XXX">      XXX here is the input filename
            
    <width>WWW</width>    WWW is width in pixels
            <height>HHH</height>
       HHH is height in pixels
          </image>

          */

     }

    String to_String() {

         ///your code to return image info in a formatted string
    }

    FeatureDetectN class Psuedocode (will have FeatureDetect1, FeatureDetect2, FeatureDetect3, FeatureDetect4, and FeatureDetect5)

    //THIS is for blob-specific cancer detection (i.e. for sure the Masses case)

    class FeatureDetect1 {

    Feature1 f1; //vector of Feature1 instances

    //your algorithm goes here
    Feature1 detect(CancerAnalysis c, Blob b){

         f1 = new Feature1(".....");
          //your algorithm goes here

        return f1;

    }

     

     

    }

     

 

© Lynne Grewe