Skip to content
Snippets Groups Projects
Commit 68f029ba authored by goldaan's avatar goldaan
Browse files

new expamles. added a part where the computed means are shown on the picture

parent 7e50dd1e
No related branches found
No related tags found
No related merge requests found
......@@ -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>
......
PTTTest/IMG_4476.JPG

244 KiB

PTTTest/IMG_4480.JPG

174 KiB

PTTTest/IMG_4550.JPG

171 KiB

......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment