diff --git a/PTTTest/.idea/workspace.xml b/PTTTest/.idea/workspace.xml index bb20eaa99c57204fb73db2d0d45594c2c51e80eb..c9851d8039ca10b272c0b0d83492ea48ea46aef6 100644 --- a/PTTTest/.idea/workspace.xml +++ b/PTTTest/.idea/workspace.xml @@ -15,11 +15,11 @@ <component name="ExecutionTargetManager" SELECTED_TARGET="default_target" /> <component name="FileEditorManager"> <leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> - <file leaf-file-name="picture.py" pinned="false" current-in-tab="true"> + <file leaf-file-name="picture.py" pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/picture.py"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="-404"> - <caret line="45" column="45" lean-forward="false" selection-start-line="45" selection-start-column="45" selection-end-line="45" selection-end-column="45" /> + <state relative-caret-position="17"> + <caret line="21" column="48" lean-forward="false" selection-start-line="21" selection-start-column="48" selection-end-line="21" selection-end-column="48" /> <folding> <element signature="e#0#21#0" expanded="true" /> </folding> @@ -27,11 +27,11 @@ </provider> </entry> </file> - <file leaf-file-name="generate_cube.py" pinned="false" current-in-tab="false"> + <file leaf-file-name="generate_cube.py" pinned="false" current-in-tab="true"> <entry file="file://$PROJECT_DIR$/../../sounds-cubes/generate_cube.py"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="1462"> - <caret line="86" column="96" lean-forward="false" selection-start-line="86" selection-start-column="96" selection-end-line="86" selection-end-column="96" /> + <state relative-caret-position="1309"> + <caret line="77" column="0" lean-forward="true" selection-start-line="77" selection-start-column="0" selection-end-line="77" selection-end-column="0" /> <folding> <element signature="e#0#10#0" expanded="true" /> </folding> @@ -42,7 +42,7 @@ <file leaf-file-name="sound_analyze.py" pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/../../sounds-cubes/sound_analyze.py"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="85"> + <state relative-caret-position="17"> <caret line="5" column="0" lean-forward="false" selection-start-line="5" selection-start-column="0" selection-end-line="5" selection-end-column="0" /> <folding> <element signature="e#0#40#0" expanded="true" /> @@ -54,7 +54,7 @@ <file leaf-file-name="process_sounds.py" pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/../../sounds-cubes/process_sounds.py"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="51"> + <state relative-caret-position="34"> <caret line="3" column="84" lean-forward="false" selection-start-line="3" selection-start-column="84" selection-end-line="3" selection-end-column="84" /> <folding> <element signature="e#0#17#0" expanded="true" /> @@ -75,10 +75,10 @@ <component name="IdeDocumentHistory"> <option name="CHANGED_PATHS"> <list> - <option value="$PROJECT_DIR$/../../sounds-cubes/generate_cube.py" /> <option value="$PROJECT_DIR$/../../sounds-cubes/process_sounds.py" /> <option value="$PROJECT_DIR$/../../sounds-cubes/sound_analyze.py" /> <option value="$PROJECT_DIR$/picture.py" /> + <option value="$PROJECT_DIR$/../../sounds-cubes/generate_cube.py" /> </list> </option> </component> @@ -102,7 +102,6 @@ <foldersAlwaysOnTop value="true" /> </navigator> <panes> - <pane id="Scope" /> <pane id="ProjectPane"> <subPane> <PATH> @@ -172,11 +171,12 @@ </subPane> </pane> <pane id="Scratches" /> + <pane id="Scope" /> </panes> </component> <component name="PropertiesComponent"> <property name="settings.editor.selected.configurable" value="com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable" /> - <property name="last_opened_file_path" value="$PROJECT_DIR$/../../sounds-cubes/process_sounds.py" /> + <property name="last_opened_file_path" value="$PROJECT_DIR$/picture.py" /> </component> <component name="RecentsManager"> <key name="CopyFile.RECENT_KEYS"> @@ -343,7 +343,7 @@ </component> <component name="ToolWindowManager"> <frame x="-8" y="0" width="1924" height="1055" extended-state="0" /> - <editor active="true" /> + <editor active="false" /> <layout> <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.18186638" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32936078" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> @@ -372,6 +372,166 @@ <watches-manager /> </component> <component name="editorHistoryManager"> + <entry file="file://$PROJECT_DIR$/picture.py"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="0"> + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> + <folding> + <element signature="e#0#21#0" expanded="true" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/../../sounds-cubes/generate_cube.py"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="1513"> + <caret line="94" column="24" lean-forward="false" selection-start-line="94" selection-start-column="24" selection-end-line="94" selection-end-column="24" /> + <folding> + <element signature="e#0#10#0" expanded="true" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/../../sounds-cubes/sound_analyze.py"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="17"> + <caret line="5" column="0" lean-forward="false" selection-start-line="5" selection-start-column="0" selection-end-line="5" selection-end-column="0" /> + <folding> + <element signature="e#0#40#0" expanded="true" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/../../sounds-cubes/process_sounds.py"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="34"> + <caret line="3" column="84" lean-forward="false" selection-start-line="3" selection-start-column="84" selection-end-line="3" selection-end-column="84" /> + <folding> + <element signature="e#0#17#0" expanded="true" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/picture.py"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="0"> + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> + <folding> + <element signature="e#0#21#0" expanded="true" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/../../sounds-cubes/generate_cube.py"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="1598"> + <caret line="94" column="24" lean-forward="false" selection-start-line="94" selection-start-column="24" selection-end-line="94" selection-end-column="24" /> + <folding> + <element signature="e#0#10#0" expanded="true" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/../../sounds-cubes/sound_analyze.py"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="17"> + <caret line="5" column="0" lean-forward="false" selection-start-line="5" selection-start-column="0" selection-end-line="5" selection-end-column="0" /> + <folding> + <element signature="e#0#40#0" expanded="true" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/../../sounds-cubes/process_sounds.py"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="34"> + <caret line="3" column="84" lean-forward="false" selection-start-line="3" selection-start-column="84" selection-end-line="3" selection-end-column="84" /> + <folding> + <element signature="e#0#17#0" expanded="true" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/picture.py"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="765"> + <caret line="45" column="45" lean-forward="false" selection-start-line="45" selection-start-column="45" selection-end-line="45" selection-end-column="45" /> + <folding> + <element signature="e#0#21#0" expanded="true" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/../../sounds-cubes/generate_cube.py"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="0"> + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> + <folding> + <element signature="e#0#10#0" expanded="true" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/../../sounds-cubes/sound_analyze.py"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="17"> + <caret line="5" column="0" lean-forward="false" selection-start-line="5" selection-start-column="0" selection-end-line="5" selection-end-column="0" /> + <folding> + <element signature="e#0#40#0" expanded="true" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/../../sounds-cubes/process_sounds.py"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="34"> + <caret line="3" column="84" lean-forward="false" selection-start-line="3" selection-start-column="84" selection-end-line="3" selection-end-column="84" /> + <folding> + <element signature="e#0#17#0" expanded="true" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/picture.py"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="0"> + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> + <folding> + <element signature="e#0#21#0" expanded="true" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/../../sounds-cubes/generate_cube.py"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="1377"> + <caret line="86" column="96" lean-forward="false" selection-start-line="86" selection-start-column="96" selection-end-line="86" selection-end-column="96" /> + <folding> + <element signature="e#0#10#0" expanded="true" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/../../sounds-cubes/sound_analyze.py"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="17"> + <caret line="5" column="0" lean-forward="false" selection-start-line="5" selection-start-column="0" selection-end-line="5" selection-end-column="0" /> + <folding> + <element signature="e#0#40#0" expanded="true" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/../../sounds-cubes/process_sounds.py"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="34"> + <caret line="3" column="84" lean-forward="false" selection-start-line="3" selection-start-column="84" selection-end-line="3" selection-end-column="84" /> + <folding> + <element signature="e#0#17#0" expanded="true" /> + </folding> + </state> + </provider> + </entry> <entry file="file://$PROJECT_DIR$/picture.py"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="85"> @@ -524,7 +684,7 @@ </entry> <entry file="file://$PROJECT_DIR$/../../sounds-cubes/process_sounds.py"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="51"> + <state relative-caret-position="34"> <caret line="3" column="84" lean-forward="false" selection-start-line="3" selection-start-column="84" selection-end-line="3" selection-end-column="84" /> <folding> <element signature="e#0#17#0" expanded="true" /> @@ -532,32 +692,32 @@ </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/../../sounds-cubes/generate_cube.py"> + <entry file="file://$PROJECT_DIR$/../../sounds-cubes/sound_analyze.py"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="1462"> - <caret line="86" column="96" lean-forward="false" selection-start-line="86" selection-start-column="96" selection-end-line="86" selection-end-column="96" /> + <state relative-caret-position="17"> + <caret line="5" column="0" lean-forward="false" selection-start-line="5" selection-start-column="0" selection-end-line="5" selection-end-column="0" /> <folding> - <element signature="e#0#10#0" expanded="true" /> + <element signature="e#0#40#0" expanded="true" /> </folding> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/../../sounds-cubes/sound_analyze.py"> + <entry file="file://$PROJECT_DIR$/picture.py"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="85"> - <caret line="5" column="0" lean-forward="false" selection-start-line="5" selection-start-column="0" selection-end-line="5" selection-end-column="0" /> + <state relative-caret-position="17"> + <caret line="21" column="48" lean-forward="false" selection-start-line="21" selection-start-column="48" selection-end-line="21" selection-end-column="48" /> <folding> - <element signature="e#0#40#0" expanded="true" /> + <element signature="e#0#21#0" expanded="true" /> </folding> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/picture.py"> + <entry file="file://$PROJECT_DIR$/../../sounds-cubes/generate_cube.py"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="-404"> - <caret line="45" column="45" lean-forward="false" selection-start-line="45" selection-start-column="45" selection-end-line="45" selection-end-column="45" /> + <state relative-caret-position="1309"> + <caret line="77" column="0" lean-forward="true" selection-start-line="77" selection-start-column="0" selection-end-line="77" selection-end-column="0" /> <folding> - <element signature="e#0#21#0" expanded="true" /> + <element signature="e#0#10#0" expanded="true" /> </folding> </state> </provider> diff --git a/PTTTest/IMG_4476.JPG b/PTTTest/IMG_4476.JPG new file mode 100644 index 0000000000000000000000000000000000000000..eba39aa928a23af3aee476cf1f3fff9a48c66057 Binary files /dev/null and b/PTTTest/IMG_4476.JPG differ diff --git a/PTTTest/IMG_4480.JPG b/PTTTest/IMG_4480.JPG new file mode 100644 index 0000000000000000000000000000000000000000..07a60b41d92e38c6b5f523ff01d869d1071f603e Binary files /dev/null and b/PTTTest/IMG_4480.JPG differ diff --git a/PTTTest/IMG_4550.JPG b/PTTTest/IMG_4550.JPG new file mode 100644 index 0000000000000000000000000000000000000000..d915ac5e9df57388994c4be7e579bf74bcbb8032 Binary files /dev/null and b/PTTTest/IMG_4550.JPG differ diff --git a/PTTTest/picture.py b/PTTTest/picture.py index 1a66e302a6b6e689ff8ec532b2d019c8554a583e..7f9d784ece820f3f6db5e39870c67eb0ac4e4c24 100644 --- a/PTTTest/picture.py +++ b/PTTTest/picture.py @@ -3,7 +3,7 @@ import numpy #import requests #great lib for connecting with a REST interface def image_test(): - list=["IMG_3119.JPG","IMG_3162.JPG","IMG_3217.JPG","IMG_3512.JPG","test.jpg","test2.jpg","wagen.jpg"] + list=["IMG_4476.jpg","IMG_4480.jpg","IMG_4550.jpg"] for item in list: test_mean(item) @@ -14,6 +14,7 @@ def test_mean(img): box_list = [] #later contains tuples for easier using of crop-function; used for getting 100x100 areas of the image mean_list = [] #later comtains the tuples of the mean color of the 100x100 areas counter_list = [] # later comtains the tuples of the mean color of the 100x100 areas + testimg= Image.open(img) #generates tuples for the box_list; for x in range(int(width/100)): @@ -21,8 +22,15 @@ def test_mean(img): box=(x*100,y*100,(x+1)*100,(y+1)*100) box_list.append(box) + pixels=testimg.load() for item in box_list: - mean_list.append(box_mean(im.crop(item))) #generates the mean_list + imgmean= box_mean(im.crop(item)) + for i in range(item[0],item[2]): + for j in range(item[1],item[3]): + pixels[i,j]=imgmean + mean_list.append(imgmean) #generates the mean_list + testimg.show() + counter_list=rgb_count(mean_list) max=rgb_max3(counter_list)