first commit
This commit is contained in:
commit
2f89442b68
14
Pipfile
Normal file
14
Pipfile
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
[[source]]
|
||||||
|
url = "https://pypi.org/simple"
|
||||||
|
verify_ssl = true
|
||||||
|
name = "pypi"
|
||||||
|
|
||||||
|
[packages]
|
||||||
|
opencv-python = "*"
|
||||||
|
python-ffmpeg = "*"
|
||||||
|
pygame = "*"
|
||||||
|
|
||||||
|
[dev-packages]
|
||||||
|
|
||||||
|
[requires]
|
||||||
|
python_version = "3.12"
|
175
Pipfile.lock
generated
Normal file
175
Pipfile.lock
generated
Normal file
@ -0,0 +1,175 @@
|
|||||||
|
{
|
||||||
|
"_meta": {
|
||||||
|
"hash": {
|
||||||
|
"sha256": "2305ff39baaa996b4a0786e3cdb5b5347719224bc165747aa332f21bdddea711"
|
||||||
|
},
|
||||||
|
"pipfile-spec": 6,
|
||||||
|
"requires": {
|
||||||
|
"python_version": "3.12"
|
||||||
|
},
|
||||||
|
"sources": [
|
||||||
|
{
|
||||||
|
"name": "pypi",
|
||||||
|
"url": "https://pypi.org/simple",
|
||||||
|
"verify_ssl": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"default": {
|
||||||
|
"numpy": {
|
||||||
|
"hashes": [
|
||||||
|
"sha256:08458fbf403bff5e2b45f08eda195d4b0c9b35682311da5a5a0a0925b11b9bd8",
|
||||||
|
"sha256:0fbb536eac80e27a2793ffd787895242b7f18ef792563d742c2d673bfcb75134",
|
||||||
|
"sha256:12f5d865d60fb9734e60a60f1d5afa6d962d8d4467c120a1c0cda6eb2964437d",
|
||||||
|
"sha256:15eb4eca47d36ec3f78cde0a3a2ee24cf05ca7396ef808dda2c0ddad7c2bde67",
|
||||||
|
"sha256:173a00b9995f73b79eb0191129f2455f1e34c203f559dd118636858cc452a1bf",
|
||||||
|
"sha256:1b902ce0e0a5bb7704556a217c4f63a7974f8f43e090aff03fcf262e0b135e02",
|
||||||
|
"sha256:1f682ea61a88479d9498bf2091fdcd722b090724b08b31d63e022adc063bad59",
|
||||||
|
"sha256:1f87fec1f9bc1efd23f4227becff04bd0e979e23ca50cc92ec88b38489db3b55",
|
||||||
|
"sha256:24a0e1befbfa14615b49ba9659d3d8818a0f4d8a1c5822af8696706fbda7310c",
|
||||||
|
"sha256:2c3a346ae20cfd80b6cfd3e60dc179963ef2ea58da5ec074fd3d9e7a1e7ba97f",
|
||||||
|
"sha256:36d3a9405fd7c511804dc56fc32974fa5533bdeb3cd1604d6b8ff1d292b819c4",
|
||||||
|
"sha256:3fdabe3e2a52bc4eff8dc7a5044342f8bd9f11ef0934fcd3289a788c0eb10018",
|
||||||
|
"sha256:4127d4303b9ac9f94ca0441138acead39928938660ca58329fe156f84b9f3015",
|
||||||
|
"sha256:4658c398d65d1b25e1760de3157011a80375da861709abd7cef3bad65d6543f9",
|
||||||
|
"sha256:485b87235796410c3519a699cfe1faab097e509e90ebb05dcd098db2ae87e7b3",
|
||||||
|
"sha256:529af13c5f4b7a932fb0e1911d3a75da204eff023ee5e0e79c1751564221a5c8",
|
||||||
|
"sha256:5a3d94942c331dd4e0e1147f7a8699a4aa47dffc11bf8a1523c12af8b2e91bbe",
|
||||||
|
"sha256:5daab361be6ddeb299a918a7c0864fa8618af66019138263247af405018b04e1",
|
||||||
|
"sha256:61728fba1e464f789b11deb78a57805c70b2ed02343560456190d0501ba37b0f",
|
||||||
|
"sha256:6790654cb13eab303d8402354fabd47472b24635700f631f041bd0b65e37298a",
|
||||||
|
"sha256:69ff563d43c69b1baba77af455dd0a839df8d25e8590e79c90fcbe1499ebde42",
|
||||||
|
"sha256:6bf4e6f4a2a2e26655717a1983ef6324f2664d7011f6ef7482e8c0b3d51e82ac",
|
||||||
|
"sha256:6e4eeb6eb2fced786e32e6d8df9e755ce5be920d17f7ce00bc38fcde8ccdbf9e",
|
||||||
|
"sha256:72dc22e9ec8f6eaa206deb1b1355eb2e253899d7347f5e2fae5f0af613741d06",
|
||||||
|
"sha256:75b4e316c5902d8163ef9d423b1c3f2f6252226d1aa5cd8a0a03a7d01ffc6268",
|
||||||
|
"sha256:7b9853803278db3bdcc6cd5beca37815b133e9e77ff3d4733c247414e78eb8d1",
|
||||||
|
"sha256:7d6fddc5fe258d3328cd8e3d7d3e02234c5d70e01ebe377a6ab92adb14039cb4",
|
||||||
|
"sha256:81b0893a39bc5b865b8bf89e9ad7807e16717f19868e9d234bdaf9b1f1393868",
|
||||||
|
"sha256:8efc84f01c1cd7e34b3fb310183e72fcdf55293ee736d679b6d35b35d80bba26",
|
||||||
|
"sha256:8fae4ebbf95a179c1156fab0b142b74e4ba4204c87bde8d3d8b6f9c34c5825ef",
|
||||||
|
"sha256:99d0d92a5e3613c33a5f01db206a33f8fdf3d71f2912b0de1739894668b7a93b",
|
||||||
|
"sha256:9adbd9bb520c866e1bfd7e10e1880a1f7749f1f6e5017686a5fbb9b72cf69f82",
|
||||||
|
"sha256:a1e01dcaab205fbece13c1410253a9eea1b1c9b61d237b6fa59bcc46e8e89343",
|
||||||
|
"sha256:a8fc2de81ad835d999113ddf87d1ea2b0f4704cbd947c948d2f5513deafe5a7b",
|
||||||
|
"sha256:b83e16a5511d1b1f8a88cbabb1a6f6a499f82c062a4251892d9ad5d609863fb7",
|
||||||
|
"sha256:bb2124fdc6e62baae159ebcfa368708867eb56806804d005860b6007388df171",
|
||||||
|
"sha256:bfc085b28d62ff4009364e7ca34b80a9a080cbd97c2c0630bb5f7f770dae9414",
|
||||||
|
"sha256:cbab9fc9c391700e3e1287666dfd82d8666d10e69a6c4a09ab97574c0b7ee0a7",
|
||||||
|
"sha256:e5eeca8067ad04bc8a2a8731183d51d7cbaac66d86085d5f4766ee6bf19c7f87",
|
||||||
|
"sha256:e9e81fa9017eaa416c056e5d9e71be93d05e2c3c2ab308d23307a8bc4443c368",
|
||||||
|
"sha256:ea2326a4dca88e4a274ba3a4405eb6c6467d3ffbd8c7d38632502eaae3820587",
|
||||||
|
"sha256:eacf3291e263d5a67d8c1a581a8ebbcfd6447204ef58828caf69a5e3e8c75990",
|
||||||
|
"sha256:ec87f5f8aca726117a1c9b7083e7656a9d0d606eec7299cc067bb83d26f16e0c",
|
||||||
|
"sha256:f1659887361a7151f89e79b276ed8dff3d75877df906328f14d8bb40bb4f5101",
|
||||||
|
"sha256:f9cf5ea551aec449206954b075db819f52adc1638d46a6738253a712d553c7b4"
|
||||||
|
],
|
||||||
|
"markers": "python_version >= '3.10'",
|
||||||
|
"version": "==2.0.1"
|
||||||
|
},
|
||||||
|
"opencv-python": {
|
||||||
|
"hashes": [
|
||||||
|
"sha256:09a332b50488e2dda866a6c5573ee192fe3583239fb26ff2f7f9ceb0bc119ea6",
|
||||||
|
"sha256:2db02bb7e50b703f0a2d50c50ced72e95c574e1e5a0bb35a8a86d0b35c98c236",
|
||||||
|
"sha256:32dbbd94c26f611dc5cc6979e6b7aa1f55a64d6b463cc1dcd3c95505a63e48fe",
|
||||||
|
"sha256:71e575744f1d23f79741450254660442785f45a0797212852ee5199ef12eed98",
|
||||||
|
"sha256:72d234e4582e9658ffea8e9cae5b63d488ad06994ef12d81dc303b17472f3526",
|
||||||
|
"sha256:9ace140fc6d647fbe1c692bcb2abce768973491222c067c131d80957c595b71f",
|
||||||
|
"sha256:fc182f8f4cda51b45f01c64e4cbedfc2f00aff799debebc305d8d0210c43f251"
|
||||||
|
],
|
||||||
|
"index": "pypi",
|
||||||
|
"markers": "python_version >= '3.6'",
|
||||||
|
"version": "==4.10.0.84"
|
||||||
|
},
|
||||||
|
"pyee": {
|
||||||
|
"hashes": [
|
||||||
|
"sha256:5d346a7d0f861a4b2e6c47960295bd895f816725b27d656181947346be98d7c1",
|
||||||
|
"sha256:b53af98f6990c810edd9b56b87791021a8f54fd13db4edd1142438d44ba2263f"
|
||||||
|
],
|
||||||
|
"markers": "python_version >= '3.8'",
|
||||||
|
"version": "==11.1.0"
|
||||||
|
},
|
||||||
|
"pygame": {
|
||||||
|
"hashes": [
|
||||||
|
"sha256:098029d01a46ea4e30620dfb7c28a577070b456c8fc96350dde05f85c0bf51b5",
|
||||||
|
"sha256:1551852a2cd5b4139a752888f6cbeeb4a96fc0fe6e6f3f8b9d9784eb8fceab13",
|
||||||
|
"sha256:1c429824b1f881a7a5ce3b5c2014d3d182aa45a22cea33c8347a3971a5446907",
|
||||||
|
"sha256:249dbf2d51d9f0266009a380ccf0532e1a57614a1528bb2f89a802b01d61f93e",
|
||||||
|
"sha256:2ed2539bb6bd211fc570b1169dc4a64a74ec5cd95741e62a0ab46bd18fe08e0d",
|
||||||
|
"sha256:315e7b3c1c573984f549ac5da9778ac4709b3b4e3a4061050d94eab63fa4fe31",
|
||||||
|
"sha256:3dc242dc15d067d10f25c5b12a1da48ca9436d8e2d72353eaf757e83612fba2f",
|
||||||
|
"sha256:3f809560c99bd1fb4716610eca0cd36412528f03da1a63841a347b71d0c604ee",
|
||||||
|
"sha256:4928f3acf5a9ce5fbab384c21f1245304535ffd5fb167ae92a6b4d3cdb55a3b6",
|
||||||
|
"sha256:4a63daee99d050f47d6ec7fa7dbd1c6597b8f082cdd58b6918d382d2bc31262d",
|
||||||
|
"sha256:4f637636a44712e94e5601ec69160a080214626471983dfb0b5b68aa0c61563d",
|
||||||
|
"sha256:4faab2df9926c4d31215986536b112f0d76f711cf02f395805f1ff5df8fd55fc",
|
||||||
|
"sha256:4fad1ab33443ecd4f958dbbb67fc09fcdc7a37e26c34054e3296fb7e26ad641e",
|
||||||
|
"sha256:5ef92ed93c354eabff4b85e457d4d6980115004ec7ff52a19fd38b929c3b80fb",
|
||||||
|
"sha256:6050f3e95f1f16602153d616b52619c6a2041cee7040eb529f65689e9633fc3e",
|
||||||
|
"sha256:6897ab87f9193510a774a3483e00debfe166f340ca159f544ef99807e2a44ec4",
|
||||||
|
"sha256:6a284664978a1989c1e31a0888b2f70cfbcbafdfa3bb310e750b0d3366416225",
|
||||||
|
"sha256:6acf7949ed764487d51123f4f3606e8f76b0df167fef12ef73ef423c35fdea39",
|
||||||
|
"sha256:6f908762941fd99e1f66d1211d26383184f6045c45673443138b214bf48a89aa",
|
||||||
|
"sha256:71eebb9803cb350298de188fb7cdd3ebf13299f78d59a71c7e81efc649aae348",
|
||||||
|
"sha256:722d33ae676aa8533c1f955eded966411298831346b8d51a77dad22e46ba3e35",
|
||||||
|
"sha256:79abcbf6d12fce51a955a0652ccd50b6d0a355baa27799535eaf21efb43433dd",
|
||||||
|
"sha256:7d65fb222eea1294cfc8206d9e5754d476a1673eb2783c03c4f70e0455320274",
|
||||||
|
"sha256:829623cee298b3dbaa1dd9f52c3051ae82f04cad7708c8c67cb9a1a4b8fd3c0b",
|
||||||
|
"sha256:89be55b7e9e22e0eea08af9d6cfb97aed5da780f0b3a035803437d481a16d972",
|
||||||
|
"sha256:8cb51533ee3204e8160600b0de34eaad70eb913a182c94a7777b6051e8fc52f1",
|
||||||
|
"sha256:904aaf29710c6b03a7e1a65b198f5467ed6525e8e60bdcc5e90ff8584c1d54ea",
|
||||||
|
"sha256:92cf12a9722f6f0bdc5520d8925a8f085cff9c054a2ea462fc409cba3781be27",
|
||||||
|
"sha256:99902f4a2f6a338057200d99b5120a600c27a9f629ca012a9b0087c045508d08",
|
||||||
|
"sha256:9bc1795f2e36302882546faacd5a0191463c4f4ae2b90e7c334a7733aa4190d2",
|
||||||
|
"sha256:a0194652db7874bdde7dfc69d659ca954544c012e04ae527151325bfb970f423",
|
||||||
|
"sha256:a6636f452fdaddf604a060849feb84c056930b6a3c036214f607741f16aac942",
|
||||||
|
"sha256:a858bbdeac5ec473ec9e726c55fb8fbdc2f4aad7c55110e899883738071c7c9b",
|
||||||
|
"sha256:ac906478ae489bb837bf6d2ae1eb9261d658aa2c34fa5b283027a04149bda81a",
|
||||||
|
"sha256:ace471b3849d68968e5427fc01166ef5afaf552a5c442fc2c28d3b7226786f55",
|
||||||
|
"sha256:afbb8d97aed93dfb116fe105603dacb68f8dab05b978a40a9e4ab1b6c1f683fd",
|
||||||
|
"sha256:b5ac288655e8a31a303cc286e79cc57979ed2ba19c3a14042d4b6391c1d3bed2",
|
||||||
|
"sha256:b832200bd8b6fc485e087bf3ef7ec1a21437258536413a5386088f5dcd3a9870",
|
||||||
|
"sha256:b834711ebc8b9d0c2a5f9bfae4403dd277b2c61bcb689e1aa630d01a1ebcf40a",
|
||||||
|
"sha256:b86771801a7fc10d9a62218f27f1d5c13341c3a27394aa25578443a9cd199830",
|
||||||
|
"sha256:c0cb7bdf3ee0233a3ac02ef777c01dfe315e6d4670f1312c83b91c1ef124359a",
|
||||||
|
"sha256:c71da36997dc7b9b4ee973fa3a5d4a6cfb2149161b5b1c08b712d2f13a63ccfe",
|
||||||
|
"sha256:d11f3646b53819892f4a731e80b8589a9140343d0d4b86b826802191b241228c",
|
||||||
|
"sha256:d3ed0547368733b854c0d9981c982a3cdfabfa01b477d095c57bf47f2199da44",
|
||||||
|
"sha256:d666667b7826b0a7921b8ce0a282ba5281dfa106976c1a3b24e32a0af65ad3b1",
|
||||||
|
"sha256:e432156b6f346f4cc6cab03ce9657600093390f4c9b10bf458716b25beebfe33",
|
||||||
|
"sha256:e44bde0840cc21a91c9d368846ac538d106cf0668be1a6030f48df139609d1e8",
|
||||||
|
"sha256:e5707aa9d029752495b3eddc1edff62e0e390a02f699b0f1ce77fe0b8c70ea4f",
|
||||||
|
"sha256:e909186d4d512add39b662904f0f79b73028fbfc4fbfdaf6f9412aed4e500e9c",
|
||||||
|
"sha256:e92294fcc85c4955fe5bc6a0404e4cc870808005dc8f359e881544e3cc214108",
|
||||||
|
"sha256:eae3ee62cc172e268121d5bd9dc406a67094d33517de3a91de3323d6ae23eb02",
|
||||||
|
"sha256:f6a58b0a5a8740a3c2cf6fc5366888bd4514561253437f093c12a9ab4fb3ecae",
|
||||||
|
"sha256:f6e5e6c010b1bf429388acf4d41d7ab2f7ad8fbf241d0db822102d35c9a2eb84",
|
||||||
|
"sha256:f82df23598a281c8c342d3c90be213c8fe762a26c15815511f60d0aac6e03a70",
|
||||||
|
"sha256:fcd28f96f0fffd28e71a98773843074597e10d7f55a098e2e5bcb2bef1bdcbf5",
|
||||||
|
"sha256:fd8848a37a7cee37854c7efb8d451334477c9f8ce7ac339c079e724dc1334a76",
|
||||||
|
"sha256:fea019713d0c89dfd5909225aa933010100035d1cd30e6c936e8b6f00529fb80"
|
||||||
|
],
|
||||||
|
"index": "pypi",
|
||||||
|
"markers": "python_version >= '3.6'",
|
||||||
|
"version": "==2.6.0"
|
||||||
|
},
|
||||||
|
"python-ffmpeg": {
|
||||||
|
"hashes": [
|
||||||
|
"sha256:19ac80af5a064a2f53c245af1a909b2d7648ea045500d96d3bcd507b88d43dc7",
|
||||||
|
"sha256:d86697da8dfb39335183e336d31baf42fb217468adf5ac97fd743898240faae3"
|
||||||
|
],
|
||||||
|
"index": "pypi",
|
||||||
|
"markers": "python_version >= '3.7'",
|
||||||
|
"version": "==2.0.12"
|
||||||
|
},
|
||||||
|
"typing-extensions": {
|
||||||
|
"hashes": [
|
||||||
|
"sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d",
|
||||||
|
"sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"
|
||||||
|
],
|
||||||
|
"markers": "python_version >= '3.8'",
|
||||||
|
"version": "==4.12.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"develop": {}
|
||||||
|
}
|
3
datetimes.py
Normal file
3
datetimes.py
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
from datetime import datetime, date, time
|
||||||
|
|
||||||
|
print(datetime.now())
|
BIN
output.mp4
Normal file
BIN
output.mp4
Normal file
Binary file not shown.
53
webcam.py
Normal file
53
webcam.py
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
|
||||||
|
# import the opencv library
|
||||||
|
import cv2
|
||||||
|
|
||||||
|
|
||||||
|
# define a video capture object
|
||||||
|
camera = cv2.VideoCapture(0)
|
||||||
|
camera.set(cv2.CAP_PROP_FPS, 20.0)
|
||||||
|
if not camera.isOpened():
|
||||||
|
print("Cannot open camera")
|
||||||
|
exit()
|
||||||
|
|
||||||
|
queue = [(False, None)] * 100
|
||||||
|
|
||||||
|
# Define the codec and create VideoWriter object
|
||||||
|
fourcc = cv2.VideoWriter_fourcc(*'mp4v')
|
||||||
|
#out = cv2.VideoWriter('output.mp4', fourcc, 20.0, (int(camera.get(3)),int(camera.get(4))))
|
||||||
|
|
||||||
|
idx = 0
|
||||||
|
offset = 0
|
||||||
|
while(True):
|
||||||
|
|
||||||
|
# Capture the video frame
|
||||||
|
# by frame
|
||||||
|
ret, frame = camera.read()
|
||||||
|
|
||||||
|
frame = cv2.flip(frame, 1)
|
||||||
|
|
||||||
|
#recod the frame
|
||||||
|
#out.write(frame)
|
||||||
|
queue[idx] = ret, frame
|
||||||
|
|
||||||
|
showo, fr = queue[(idx - offset) % len(queue)]
|
||||||
|
if showo:
|
||||||
|
cv2.imshow('vid', fr)
|
||||||
|
|
||||||
|
# the 'q' button is set as the quitting button you may use any desired button of your choice
|
||||||
|
key = cv2.waitKey(1) & 0xFF
|
||||||
|
if key == ord('q'):
|
||||||
|
break
|
||||||
|
|
||||||
|
if key == ord('a'):
|
||||||
|
offset += 1
|
||||||
|
if key == ord('d'):
|
||||||
|
offset -= 1
|
||||||
|
|
||||||
|
idx = (idx + 1) % len(queue)
|
||||||
|
|
||||||
|
# After the loop release the cap object
|
||||||
|
camera.release()
|
||||||
|
#out.release()
|
||||||
|
# Destroy all the windows
|
||||||
|
cv2.destroyAllWindows()
|
Loading…
Reference in New Issue
Block a user