Browse Source

Auto stash before merge of "efe" and "origin/yigit"

efe
Efe Aydın 6 years ago
parent
commit
f6a165f652
13 changed files with 76 additions and 14 deletions
  1. +3
    -3
      master_app/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
  2. +14
    -0
      robot/robot.py
  3. +5
    -0
      server_side/.idea/codeStyles/codeStyleConfig.xml
  4. +4
    -0
      server_side/.idea/encodings.xml
  5. +6
    -0
      server_side/.idea/misc.xml
  6. +9
    -0
      server_side/.idea/modules.xml
  7. +6
    -0
      server_side/.idea/vcs.xml
  8. +1
    -1
      server_side/api/app.py
  9. +3
    -3
      server_side/api/modules/SpotSelector.py
  10. BIN
      server_side/api/modules/c.jpeg
  11. +21
    -0
      server_side/api/modules/databases/locations.json
  12. +3
    -6
      server_side/api/modules/smart_park.py
  13. +1
    -1
      traffic_analyzer/object_detection/data/mscoco_label_map.pbtxt

+ 3
- 3
master_app/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst View File

@ -1,3 +1,3 @@
/home/yigit/projects/MyCity/master_app/src/main/java/me/yigitcolakoglu/master_app/Main.java
/home/yigit/projects/MyCity/master_app/src/main/java/me/yigitcolakoglu/master_app/managementForm.java
/home/yigit/projects/MyCity/master_app/src/main/java/me/yigitcolakoglu/master_app/cameraForm.java
/home/efeaydin/Masaüstü/MyCity/master_app/src/main/java/me/yigitcolakoglu/master_app/managementForm.java
/home/efeaydin/Masaüstü/MyCity/master_app/src/main/java/me/yigitcolakoglu/master_app/cameraForm.java
/home/efeaydin/Masaüstü/MyCity/master_app/src/main/java/me/yigitcolakoglu/master_app/Main.java

+ 14
- 0
robot/robot.py View File

@ -0,0 +1,14 @@
import os
path = '/home/robot/image/'
prev_files = []
files = []
# r=root, d=directories, f = files
for r, d, f in os.walk(path):
for file in f:
if '.jpg' in file:
files.append(os.path.join(r, file))
for f in files:
print(f)

+ 5
- 0
server_side/.idea/codeStyles/codeStyleConfig.xml View File

@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
</state>
</component>

+ 4
- 0
server_side/.idea/encodings.xml View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with NO BOM" />
</project>

+ 6
- 0
server_side/.idea/misc.xml View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_10" project-jdk-name="10" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/classes" />
</component>
</project>

+ 9
- 0
server_side/.idea/modules.xml View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/server_side.iml" filepath="$PROJECT_DIR$/server_side.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/smartcity/server_side.smartcity.iml" filepath="$PROJECT_DIR$/.idea/modules/smartcity/server_side.smartcity.iml" />
</modules>
</component>
</project>

+ 6
- 0
server_side/.idea/vcs.xml View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>

+ 1
- 1
server_side/api/app.py View File

@ -2,7 +2,7 @@ from flask import Flask, send_from_directory
from flask_restful import Api
from flask_cors import CORS, cross_origin
from modules import user_info, voting_system, rating_system, denunciation, navigation, bus_stops, announcements, complaint, car_crash,smart_park
from modules import user_info, voting_system, rating_system, denunciation, navigation, bus_stops, announcements, complaint, car_crash, smart_park
from modules import utility
from modules import user_set


+ 3
- 3
server_side/api/modules/SpotSelector.py View File

@ -4,9 +4,9 @@ import json
rects = []
cam = cv2.VideoCapture(2)
ret,im = cam.read()
cam.release()
#cam = cv2.VideoCapture("http://192.168.43.246:4747/mjpegfeed")
#ret,im = cam.read()
im = cv2.imread("lot.jpg")
if __name__ == '__main__' :
while(True):


BIN
server_side/api/modules/c.jpeg View File

Before After
Width: 480  |  Height: 640  |  Size: 42 KiB Width: 960  |  Height: 1280  |  Size: 118 KiB

+ 21
- 0
server_side/api/modules/databases/locations.json View File

@ -1,5 +1,6 @@
{
"0": {
<<<<<<< Updated upstream
"x1": 2,
"y1": 94,
"x2": 198,
@ -18,6 +19,26 @@
"y1": 66,
"x2": 640,
"y2": 200,
=======
"x1": 208,
"y1": 356,
"x2": 374,
"y2": 460,
"priority": 0
},
"1": {
"x1": 114,
"y1": 358,
"x2": 230,
"y2": 450,
"priority": 1
},
"2": {
"x1": 0,
"y1": 346,
"x2": 106,
"y2": 478,
>>>>>>> Stashed changes
"priority": 2
}
}

+ 3
- 6
server_side/api/modules/smart_park.py View File

@ -93,7 +93,7 @@ def generateData(locs, img, avgs,show):
if spot in show:
plt.imshow(vals[spot], interpolation='nearest')
plt.show()
#plt.show()
return distances
@ -102,8 +102,6 @@ def im2str(im):
imdata = pickle.dumps(im)
return base64.b64encode(imdata).decode('ascii')
cam = cv2.VideoCapture(2)
plt.axis("off")
with open("modules/databases/locations.json","r") as f:
locs = json.loads(f.read())
@ -120,9 +118,7 @@ if 0:
class Empty(Resource):
def get(self):
ret,image = cam.read()
#image = cv2.imread("module s/lot.jpg")
image = cv2.imread("modules/lot.jpg")
backup = image.copy()
spot_data = generateData(locs,image,data,["0","1","2"])
print(spot_data)
@ -140,6 +136,7 @@ class Empty(Resource):
print(spot_data)
if best_spot == -1:
print("Sorry, no spot found :(")
return
else:
print("Empty spot found at {}".format(int(best_spot) + 1))
foo = locs[best_spot]


+ 1
- 1
traffic_analyzer/object_detection/data/mscoco_label_map.pbtxt View File

@ -36,7 +36,7 @@ item {
item {
name: "/m/07r04"
id: 8
display_name: "ambulance"
display_name: "truck"
}
item {
name: "/m/019jd"


Loading…
Cancel
Save