Skip to content

Commit 7006831

Browse files
committed
v1.1
1 parent cc3d777 commit 7006831

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+22
-17
lines changed

camera/camera.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
class VideoCamera(object):
44
def __init__(self):
5-
self.video = cv2.VideoCapture(1)
5+
self.video = cv2.VideoCapture(0)
66

77
self.video.set(cv2.CAP_PROP_FRAME_WIDTH, 1920)
88
self.video.set(cv2.CAP_PROP_FRAME_HEIGHT, 1080)

images/0_1.png

96.5 KB

images/0_2.png

273 KB

images/0_3.png

971 KB

images/10_1.png

873 KB

images/10_2.png

1.01 MB

images/10_3.png

971 KB

images/11_1.png

873 KB

images/11_2.png

1.01 MB

images/11_3.png

971 KB

images/12_1.png

873 KB

images/12_2.png

1.01 MB

images/12_3.png

971 KB

images/13_1.png

873 KB

images/13_2.png

1.01 MB

images/13_3.png

384 KB

images/16_1.png

755 KB

images/16_2.png

686 KB

images/16_3.png

690 KB

images/17_1.png

706 KB

images/17_2.png

760 KB

images/17_3.png

905 KB

images/18_1.png

909 KB

images/18_2.png

838 KB

images/18_3.png

277 KB

images/1_1.png

157 KB

images/1_2.png

326 KB

images/1_3.png

-402 KB

images/2_1.png

135 KB

images/2_2.png

265 KB

images/2_3.png

971 KB

images/3_1.png

117 KB

images/3_2.png

271 KB

images/3_3.png

971 KB

images/4_1.png

116 KB

images/4_2.png

270 KB

images/4_3.png

971 KB

images/5_1.png

131 KB

images/5_2.png

280 KB

images/5_3.png

171 KB

images/6_1.png

797 KB

images/6_2.png

998 KB

images/6_3.png

878 KB

images/7_1.png

860 KB

images/7_2.png

999 KB

images/7_3.png

936 KB

images/8_1.png

831 KB

images/8_2.png

1010 KB

images/8_3.png

936 KB

images/9_1.png

841 KB

images/9_2.png

982 KB

images/9_3.png

925 KB

openPurikura.db

0 Bytes
Binary file not shown.

openPurikura.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@
4444
curid = 0
4545
email = ""
4646

47+
# Camera Setting
48+
subprocess.call(['bash', 'v4l2-setting.sh'])
49+
4750

4851
@app.route('/')
4952
def index():
@@ -139,7 +142,7 @@ def retouching():
139142
face_landmarks = pl.find.facemark(gray_img)
140143

141144
print("a")
142-
image = pl.effects.chromakey_green(image)
145+
image = pl.effects.chromakey_blue(image)
143146
print("b")
144147
background = cv2.imread(ASSETS_DIR + '/background/pack-{}/bg-{}.png'.format(id_pack, i))
145148
image = pl.effects.merge(background, image)

purikura_lib/effects.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ def chromakey_blue(image):
7575
"""
7676
# Green
7777
# why I should divide by 2...f**k
78-
lower_color = np.array([160 / 2, 50, 100])
79-
upper_color = np.array([220 / 2, 255, 255])
78+
lower_color = np.array([180 / 2, 50, 100])
79+
upper_color = np.array([240 / 2, 255, 255])
8080

8181
# convert image to hsv
8282
hsv_img = cv2.cvtColor(image, cv2.COLOR_BGR2HSV)

templates/assets/js/cd300.js

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
$(function(){
2-
let time = 300;
2+
let time = 10;
33

44
setInterval(function(){
55

66
$('#timer').text('' + parseInt(time / 100) + parseInt(time % 100 / 10) +time % 100 % 10);
7-
if (time > 1) {
7+
if (time > 0) {
88
time--;
9+
} else if (time == 0) {
10+
time--;
11+
savePictures()
912
}
10-
/*
11-
else {
12-
$('#form').submit();
13-
}
14-
*/
1513
},1000);
1614
});

templates/assets/photos/0_after.png

55.4 KB

templates/assets/photos/0_before.png

-315 KB

templates/assets/photos/1_after.png

382 KB

templates/assets/photos/1_before.png

-113 KB

templates/assets/photos/2_after.png

134 KB

templates/assets/photos/2_before.png

-206 KB

templates/assets/photos/3_after.png

324 KB

templates/assets/photos/3_before.png

-165 KB

templates/assets/photos/4_after.png

245 KB

templates/assets/photos/4_before.png

-175 KB

templates/assets/photos/draw_0.png

134 KB

templates/assets/photos/draw_1.png

324 KB

templates/assets/photos/draw_2.png

245 KB

templates/assets/photos/retouch.png

1.18 MB

templates/draw.html

-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
</table>
4747
<table id="pallet">
4848
<tr>
49-
<<<<<<< HEAD
5049
<td><div id="color-deepred" onclick="changeColor(1)"></div></td>
5150
<td><div id="color-purple" onclick="changeColor(6)"></div></td>
5251
<td><div id="color-green" onclick="changeColor(11)"></div></td>

v4l2-setting.sh

+10-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1-
v4l2-ctl -c brightness=0
2-
v4l2-ctl -c contrast=255
1+
v4l2-ctl -c brightness=128
2+
v4l2-ctl -c contrast=32
33
v4l2-ctl -c saturation=32
44
v4l2-ctl -c white_balance_temperature_auto=0
5-
v4l2-ctl -c gain=24
5+
v4l2-ctl -c gain=30
66
v4l2-ctl -c power_line_frequency=2
7-
v4l2-ctl -c white_balance_temperature=4500
7+
v4l2-ctl -c white_balance_temperature=4986
88
v4l2-ctl -c sharpness=22
99
v4l2-ctl -c backlight_compensation=1
1010
v4l2-ctl -c exposure_auto=1
11-
v4l2-ctl -c exposure_absolute=256
11+
v4l2-ctl -c exposure_absolute=200
1212
v4l2-ctl -c exposure_auto_priority=0
13+
v4l2-ctl -c pan_absolute=0
14+
v4l2-ctl -c tilt_absolute=0
15+
v4l2-ctl -c focus_absolute=0
16+
v4l2-ctl -c focus_auto=0
17+
v4l2-ctl -c zoom_absolute=1

0 commit comments

Comments
 (0)