CS663 | computer vision
  • outline
  • projects
  • syllabus
  • links
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 OR (Process->Masses AND Process->Micro-calcifications): 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 (for both Masses and Micro-calcifications)

    This is a class that contains the BlobList and references to the Image as well as any global features for the micro-calcification class. For the Masses case it may be that you have no global features. NOTE: depending on YOUR proposal you may have say only 3 global features and 2 blob features for your handling of the Micro-calcification case. Another student could have 5 global features and 0 blob features for their handling of the micro-calcification case. This could also (though ver unlikely) be true for the Masses case (there typically would have 5 features for each blob and not use the global features). So, there is some variability here in the number of Global Features.

         class CancerAnalysis{

    ImageClass image; //pointer to the Image being processed

    Vector BlobList;   //vector containing instances of Blob class

    GlobalFeature1 gf1; //global feature 1 -probably only filled with
                                   // real data for micro-calcifications case.

    GlobalFeature2 gf2; //global feature 2 -probably only filled with
                                   // real data for micro-calcifications case.

    GlobalFeature3 gf3; //global feature 3 -probably only filled with
                                   // real data for micro-calcifications case.

    GlobalFeature4 gf4; //global feature 4 -probably only filled with
                                   // real data for micro-calcifications case.

    GlobalFeature5 gf5; //global feature 5 -probably only filled with
                                   // real data for micro-calcifications case.

          }

    Blob Class Psuedocode (for both Masses and Micro-calcifications)

    note: in micro-calcifications case you may have instead of features (or can have some) that belong to each blob only the global features that belong to CancerAnalysis class.
    NOTE: depending on YOUR proposal you may only use these 5 features for your Masses case. However IF YOU DO have blob-specific features (i.e.) for Micro-calcifications, you need to alter this code to have additionally the MicroCalcificationFeature1 mf1, and MIcroCalcificationFeature2 mf2; So your proposal will determine if there are more than 5 features located here.

         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;

    //add any blob-specific features for MicroCalcification here.

           }

    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(Blob b){

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

        return f1;

    }

     

     

    }

     

    GlobalFeatureDetectN class Psuedocode (will have GlobalFeatureDetect1, GlobalFeatureDetect2, etc. depending on your proposal)

    //THIS is for the micro-calcification class (possibly masses depending on proposal)

    class GlobalFeatureDetect1 {

    GlobalFeature1 gf1;

    //your algorithm goes here
    GlobalFeature1 detect(CancerAnalysis c){ //doing for entire BlobList in image

        gf1 = new GlobalFeature1(".....");
          //your algorithm goes here

         return gft;

    }

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

    super.to_XML();

    //see above for illustration of XML.but,YOU need to
    //make up the xml tags for this Feature 1 and the
    //information will be particular to the features choose.

    }

     

     

    }

     

Web Site Development

 

CS6825

cs663:computer vision

  • home
  • outline
  • projects
  • syllabus
  • links