Changeset 33082


Ignore:
Timestamp:
05/16/19 11:15:02 (22 months ago)
Author:
cpb16
Message:

added notes from meeting

Location:
other-projects/is-sheet-music-encore/trunk/image-identification
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • other-projects/is-sheet-music-encore/trunk/image-identification/.idea/workspace.xml

    r33070 r33082  
    33  <component name="ChangeListManager">
    44    <list default="true" readonly="true" id="9bad4f92-4a7d-46a2-b6f0-94214c9f55cc" name="Default" comment="">
     5      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
     6      <change beforePath="$PROJECT_DIR$/out/production/image-identification/Main.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/image-identification/Main.class" afterDir="false" />
    57      <change beforePath="$PROJECT_DIR$/src/Main.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Main.java" afterDir="false" />
    68    </list>
     
    1820        <entry file="file://$PROJECT_DIR$/src/Main.java">
    1921          <provider selected="true" editor-type-id="text-editor">
    20             <state relative-caret-position="107">
    21               <caret line="19" lean-forward="true" selection-start-line="19" selection-end-line="19" />
     22            <state relative-caret-position="495">
     23              <caret line="33" column="38" selection-start-line="33" selection-start-column="38" selection-end-line="33" selection-end-column="38" />
    2224              <folding>
    2325                <element signature="imports" expanded="true" />
     
    4951  </component>
    5052  <component name="PropertiesComponent">
     53    <property name="GenerateAntBuildDialog.backupFiles" value="true" />
     54    <property name="GenerateAntBuildDialog.enableUiFormCompile" value="true" />
     55    <property name="GenerateAntBuildDialog.forceTargetJdk" value="true" />
     56    <property name="GenerateAntBuildDialog.generateSingleFile" value="true" />
     57    <property name="GenerateAntBuildDialog.outputFileNameProperty" value="image-identification" />
    5158    <property name="full.screen.before.presentation.mode" value="false" />
    5259    <property name="last_opened_file_path" value="$USER_HOME$/Desktop" />
    53     <property name="project.structure.last.edited" value="Project" />
     60    <property name="project.structure.last.edited" value="Modules" />
    5461    <property name="project.structure.proportion" value="0.15" />
    5562    <property name="project.structure.side.proportion" value="0.2" />
     
    130137      <window_info anchor="bottom" id="Event Log" order="1" side_tool="true" />
    131138      <window_info anchor="right" id="Maven Projects" order="3" />
    132       <window_info anchor="bottom" id="Run" order="6" weight="0.34662578" />
     139      <window_info anchor="bottom" id="Run" order="6" weight="0.26993865" />
    133140      <window_info anchor="bottom" id="Version Control" order="2" />
    134141      <window_info anchor="bottom" id="Terminal" order="0" weight="0.42638037" />
     
    154161      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="7" weight="0.25" />
    155162      <window_info anchor="right" id="Capture Analysis" order="0" />
    156       <window_info anchor="bottom" id="Run" order="6" visible="true" weight="0.34662578" />
     163      <window_info anchor="bottom" id="Version Control" order="2" />
    157164      <window_info anchor="right" id="Theme Preview" order="2" />
    158165      <window_info content_ui="combo" id="Project" order="5" visible="true" weight="0.18382749" />
     
    161168      <window_info anchor="right" id="Ant Build" order="6" weight="0.25" />
    162169      <window_info anchor="bottom" id="TODO" order="10" />
    163       <window_info anchor="bottom" id="Version Control" order="2" />
     170      <window_info anchor="bottom" id="Run" order="6" visible="true" weight="0.34662578" />
    164171      <window_info id="Image Layers" order="4" />
    165172      <window_info id="Designer" order="0" />
     
    190197    <entry file="file://$PROJECT_DIR$/src/Main.java">
    191198      <provider selected="true" editor-type-id="text-editor">
     199        <state relative-caret-position="285">
     200          <caret line="19" lean-forward="true" selection-start-line="19" selection-end-line="19" />
     201          <folding>
     202            <element signature="imports" expanded="true" />
     203          </folding>
     204        </state>
     205      </provider>
     206    </entry>
     207    <entry file="file://$PROJECT_DIR$/src/Main.java">
     208      <provider selected="true" editor-type-id="text-editor">
    192209        <state relative-caret-position="1410">
    193210          <caret line="94" column="73" selection-start-line="94" selection-start-column="73" selection-end-line="94" selection-end-column="73" />
     
    237254    <entry file="file://$PROJECT_DIR$/src/Main.java">
    238255      <provider selected="true" editor-type-id="text-editor">
    239         <state relative-caret-position="107">
    240           <caret line="19" lean-forward="true" selection-start-line="19" selection-end-line="19" />
     256        <state relative-caret-position="495">
     257          <caret line="33" column="38" selection-start-line="33" selection-start-column="38" selection-end-line="33" selection-end-column="38" />
    241258          <folding>
    242259            <element signature="imports" expanded="true" />
  • other-projects/is-sheet-music-encore/trunk/image-identification/src/Main.java

    r33070 r33082  
    1616//https://riptutorial.com/opencv/example/21963/converting-an-mat-object-to-an-bufferedimage-object
    1717
     18
     19
     20//GOAL for 21st
     21
     22
     23//Classifier 01
     24//Have args so can call "java image-identification-classifier01 XX XX"
     25//args can be parameters in algorthim such as threshold or theta?
     26//Run on 5000 images.
     27//Record success rates
     28//All done with makefile
     29
     30
     31//But first understand houghline transform
     32//Know what the algorithm being used is doing.
     33//MAke constants for this classifier
     34//Make java be able to run on CMD line
    1835
    1936public class Main {
     
    6582            percentage = ((float)redCount/(float)pixelCount)*(float)100;
    6683            //If more than %10 and less than %50 then its sheet music!
    67             if(percentage > 10 && percentage < 50){
     84            if(percentage > 10 && percentage < 50){ //MAKE THESE CONSTANTS!!
    6885                return true;}
    6986        }
     
    99116            Imgproc.HoughLines(edgesDetected, lines, 1, Math.PI / 180, 150); // runs the actual detection
    100117            // Draw the lines
     118            //LOOK OVER THIS AGAIN THE 1000 might be image height?
     119            //THRESHOLD should be changed, based on img dimensions?
     120
    101121            for (int x = 0; x < lines.rows(); x++) {
    102122                double rho = lines.get(x, 0)[0],
    103123                        theta = lines.get(x, 0)[1];
     124                //CONVERT to Cartisean coord
    104125                double a = Math.cos(theta), b = Math.sin(theta);
    105126                double x0 = a * rho, y0 = b * rho;
     127
    106128                Point pt1 = new Point(Math.round(x0 + 1000 * (-b)), Math.round(y0 + 1000 * (a)));
    107129                Point pt2 = new Point(Math.round(x0 - 1000 * (-b)), Math.round(y0 - 1000 * (a)));
Note: See TracChangeset for help on using the changeset viewer.