Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ishan-maheshwari committed Mar 26, 2019
2 parents 390d32a + 7d620f5 commit d83f752
Show file tree
Hide file tree
Showing 12 changed files with 4,438 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .idea/SUMO_Indian_Traffic.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions Traffic Modeling Real Vision Based/cross_read.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def leftsubtractImage(image, SIDE):
bg = cv2.imread('cross_left_upper.png')
fgmask = image - bg
fgmask = cv2.cvtColor(fgmask, cv2.COLOR_BGR2GRAY)
#cv2.imshow("sub_upper", fgmask)
cv2.imshow("sub_upper", fgmask)

elif SIDE == 'lower':
bg = cv2.imread('cross_left_lower.png')
Expand Down Expand Up @@ -80,7 +80,7 @@ def rightsubtractImage(image, SIDE):
bg = cv2.imread('cross_right_upper.png')
fgmask = image - bg
fgmask = cv2.cvtColor(fgmask, cv2.COLOR_BGR2GRAY)
#cv2.imshow("sub_upper", fgmask)
cv2.imshow("sub_upper", fgmask)

elif SIDE == 'lower':
bg = cv2.imread('cross_right_lower.png')
Expand Down Expand Up @@ -178,8 +178,9 @@ def leftgetUpperQlength():
image = LeftgetScreenImage()
#cv2.imshow("test",image)
upper_lane = np.array([(446, 19), (535, 19), (535, 331), (446, 331)], dtype="float32")
cv2.imshow("upper",upper_lane)
warp_upperlane = warped_simulation(upper_lane, image)
#cv2.imshow("testupper",warp_upperlane)
cv2.imshow("test_warp_upper",warp_upperlane)
mask_upper = leftsubtractImage(warp_upperlane, "upper")
tail_length_upper = tail_length(mask_upper)

Expand Down
26 changes: 13 additions & 13 deletions Traffic Modeling Real Vision Based/data/cross_auto.rou.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<routes>
<vTypeDistribution id="mixed">
<vType id="car" vClass="passenger" speedDev="0.2" latAlignment="compact" probability="0.3"/>
<vType id="moped" vClass="moped" speedDev="0.4" transition_timelatAlignment="compact" probability="0.7"/>
<vType id="moped" vClass="moped" speedDev="0.4" latAlignment="compact" probability="0.7"/>
</vTypeDistribution>
<route id="r0" edges="51o 1i 2o 52i"/>
<route id="r1" edges="51o 1i 4o 54i"/>
Expand All @@ -15,16 +15,16 @@
<route id="r9" edges="53o 3i 4o 54i"/>
<route id="r10" edges="53o 3i 1o 51i"/>
<route id="r11" edges="53o 3i 2o 52i"/>
<flow id="mixed1" begin="0" end="2500" number="800" route="r0" type="mixed" departLane="random" departPosLat="random"/>
<flow id="mixed2" begin="0" end="2500" number="60" route="r1" type="mixed" departLane="random" departPosLat="random"/>
<flow id="mixed3" begin="0" end="2500" number="60" route="r2" type="mixed" departLane="random" departPosLat="random"/>
<flow id="mixed4" begin="2500" end="5000" number="600" route="r3" type="mixed" departLane="random" departPosLat="random"/>
<flow id="mixed5" begin="2500" end="5000" number="30" route="r4" type="mixed" departLane="random" departPosLat="random"/>
<flow id="mixed6" begin="2500" end="5000" number="40" route="r5" type="mixed" departLane="random" departPosLat="random"/>
<flow id="mixed7" begin="5000" end="7500" number="400" route="r6" type="mixed" departLane="random" departPosLat="random"/>
<flow id="mixed8" begin="5000" end="7500" number="40" route="r7" type="mixed" departLane="random" departPosLat="random"/>
<flow id="mixed9" begin="5000" end="7500" number="40" route="r8" type="mixed" departLane="random" departPosLat="random"/>
<flow id="mixed10" begin="7500" end="10000" number="300" route="r9" type="mixed" departLane="random" departPosLat="random"/>
<flow id="mixed11" begin="7500" end="10000" number="20" route="r10" type="mixed" departLane="random" departPosLat="random"/>
<flow id="mixed12" begin="7500" end="10000" number="10" route="r11" type="mixed" departLane="random" departPosLat="random"/>
<flow id="mixed1" begin="0" end="25000" number="2000" route="r0" type="mixed" departLane="random" departPosLat="random"/>
<flow id="mixed2" begin="0" end="25000" number="200" route="r1" type="mixed" departLane="random" departPosLat="random"/>
<flow id="mixed3" begin="0" end="25000" number="400" route="r2" type="mixed" departLane="random" departPosLat="random"/>
<flow id="mixed4" begin="0" end="25000" number="2000" route="r3" type="mixed" departLane="random" departPosLat="random"/>
<flow id="mixed5" begin="0" end="25000" number="200" route="r4" type="mixed" departLane="random" departPosLat="random"/>
<flow id="mixed6" begin="0" end="25000" number="400" route="r5" type="mixed" departLane="random" departPosLat="random"/>
<flow id="mixed7" begin="0" end="25000" number="2000" route="r6" type="mixed" departLane="random" departPosLat="random"/>
<flow id="mixed8" begin="0" end="25000" number="200" route="r7" type="mixed" departLane="random" departPosLat="random"/>
<flow id="mixed9" begin="0" end="25000" number="400" route="r8" type="mixed" departLane="random" departPosLat="random"/>
<flow id="mixed10" begin="0" end="25000" number="2000" route="r9" type="mixed" departLane="random" departPosLat="random"/>
<flow id="mixed11" begin="0" end="25000" number="400" route="r10" type="mixed" departLane="random" departPosLat="random"/>
<flow id="mixed12" begin="0" end="25000" number="200" route="r11" type="mixed" departLane="random" departPosLat="random"/>
</routes>
Loading

0 comments on commit d83f752

Please sign in to comment.