First commit
Former-commit-id: 424079609133edcc501ae185509836ee1181a02c
This commit is contained in:
Binary file not shown.
@ -0,0 +1,30 @@
|
||||
@echo off
|
||||
|
||||
:: BatchGotAdmin
|
||||
|
||||
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
|
||||
|
||||
if '%errorlevel%' NEQ '0' (
|
||||
echo Requesting administrative privileges...
|
||||
goto UACPrompt
|
||||
) else ( goto gotAdmin )
|
||||
|
||||
:UACPrompt
|
||||
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
|
||||
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
|
||||
|
||||
"%temp%\getadmin.vbs"
|
||||
exit /B
|
||||
|
||||
:gotAdmin
|
||||
if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
|
||||
pushd "%CD%"
|
||||
CD /D "%~dp0"
|
||||
|
||||
set INSDIR="%ProgramFiles%\IPCameraBridge\x64"
|
||||
set INSDLL="%ProgramFiles%\IPCameraBridge\x64\IPCameraBridge.dll"
|
||||
MD %INSDIR%
|
||||
COPY /Y IPCameraBridge.dll %INSDIR%
|
||||
REGSVR32.EXE /S %INSDLL%
|
||||
RUNDLL32.EXE %INSDLL%,ShowSettings
|
||||
pause
|
@ -0,0 +1,28 @@
|
||||
@echo off
|
||||
|
||||
:: BatchGotAdmin
|
||||
|
||||
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
|
||||
|
||||
if '%errorlevel%' NEQ '0' (
|
||||
echo Requesting administrative privileges...
|
||||
goto UACPrompt
|
||||
) else ( goto gotAdmin )
|
||||
|
||||
:UACPrompt
|
||||
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
|
||||
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
|
||||
|
||||
"%temp%\getadmin.vbs"
|
||||
exit /B
|
||||
|
||||
:gotAdmin
|
||||
if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
|
||||
pushd "%CD%"
|
||||
CD /D "%~dp0"
|
||||
|
||||
set INSDIR="%ProgramFiles%\IPCameraBridge\x64"
|
||||
set INSDLL="%ProgramFiles%\IPCameraBridge\x64\IPCameraBridge.dll"
|
||||
REGSVR32.EXE /u /s %INSDLL%
|
||||
DEL /F %INSDLL%
|
||||
pause
|
Binary file not shown.
@ -0,0 +1,30 @@
|
||||
@echo off
|
||||
|
||||
:: BatchGotAdmin
|
||||
|
||||
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
|
||||
|
||||
if '%errorlevel%' NEQ '0' (
|
||||
echo Requesting administrative privileges...
|
||||
goto UACPrompt
|
||||
) else ( goto gotAdmin )
|
||||
|
||||
:UACPrompt
|
||||
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
|
||||
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
|
||||
|
||||
"%temp%\getadmin.vbs"
|
||||
exit /B
|
||||
|
||||
:gotAdmin
|
||||
if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
|
||||
pushd "%CD%"
|
||||
CD /D "%~dp0"
|
||||
|
||||
set INSDIR="%ProgramFiles%\IPCameraBridge\x86"
|
||||
set INSDLL="%ProgramFiles%\IPCameraBridge\x86\IPCameraBridge.dll"
|
||||
MD %INSDIR%
|
||||
COPY /Y IPCameraBridge.dll %INSDIR%
|
||||
REGSVR32.EXE /S %INSDLL%
|
||||
RUNDLL32.EXE %INSDLL%,ShowSettings
|
||||
pause
|
@ -0,0 +1,28 @@
|
||||
@echo off
|
||||
|
||||
:: BatchGotAdmin
|
||||
|
||||
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
|
||||
|
||||
if '%errorlevel%' NEQ '0' (
|
||||
echo Requesting administrative privileges...
|
||||
goto UACPrompt
|
||||
) else ( goto gotAdmin )
|
||||
|
||||
:UACPrompt
|
||||
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
|
||||
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
|
||||
|
||||
"%temp%\getadmin.vbs"
|
||||
exit /B
|
||||
|
||||
:gotAdmin
|
||||
if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
|
||||
pushd "%CD%"
|
||||
CD /D "%~dp0"
|
||||
|
||||
set INSDIR="%ProgramFiles%\IPCameraBridge\x86"
|
||||
set INSDLL="%ProgramFiles%\IPCameraBridge\x86\IPCameraBridge.dll"
|
||||
REGSVR32.EXE /u /s %INSDLL%
|
||||
DEL /F %INSDLL%
|
||||
pause
|
1
note_by_camera/IP-Camera-Bridge-master/README.md
Normal file
1
note_by_camera/IP-Camera-Bridge-master/README.md
Normal file
@ -0,0 +1 @@
|
||||
This is a response cloned from [Source](https://github.com/shenyaocn/IP-Camera-Bridge)
|
65
note_by_camera/IP-Camera-Bridge-master/README_ZH.md
Normal file
65
note_by_camera/IP-Camera-Bridge-master/README_ZH.md
Normal file
@ -0,0 +1,65 @@
|
||||
# IP Camera Bridge
|
||||
|
||||
一个用于Windows的MJPEG视频流和虚拟麦克风驱动程序,可以使您的Windows应用程序把《IP摄像头》作为带音频输入的电脑摄像头使用。
|
||||

|
||||
|
||||
**IP Camera Bridge 需要Win7 (32位 或 64位) 或以上版本系统才能工作!**
|
||||
|
||||
# 1. 安装
|
||||
|
||||
下载此工程并解压,双击文件夹 "IPCameraBridge\x86" 下的install.bat安装。如果弹出UAV提示框,请点击“是” 。接下去将会弹出IP Camera Bridge属性对话框,填入你的IP摄像头的信息,单击确定!
|
||||
|
||||

|
||||
|
||||
IP Camera Bridge同样提供64位版本的二进制文件,同样安装上面的说明安装即可!
|
||||
|
||||
**从应用程序中选择 IP Camera Bridge Plus 作为视频捕获设备,选择 IP Camera Bridge Audio 作为音频捕获设备即可**
|
||||
例如:
|
||||

|
||||
|
||||
# 2. 设置
|
||||
|
||||
你可以在运行"install.bat"安装时进行设置。也可以通过宿主应用程序的滤镜选项进行设置,如下图所示:
|
||||
|
||||

|
||||
|
||||
# 3. 兼容性
|
||||
|
||||
经过我的测试,以下应用程序可以与IP Camera Bridge完美工作:
|
||||
* AMCap
|
||||
* Chrome
|
||||
* MPC-HC
|
||||
* Media Player Classic
|
||||
* PotPlayer
|
||||
* KMPlayer
|
||||
* TeamViewer 12
|
||||
* QQ
|
||||
* QGroundControl
|
||||
* Mission Planner
|
||||
* Python with OpenCV module
|
||||
* Skype (desktop version)
|
||||
* Adobe Live Flash Encoder
|
||||
* GraphEdit
|
||||
* GraphEditPlus
|
||||
|
||||
其它基于DirectShow的应用程序应该也可以工作 :)
|
||||
|
||||
你还可以同时在多个程序中同时使用!
|
||||
|
||||

|
||||
|
||||
**但是,IP Camera Bridge不能与Modern App协同工作!**
|
||||
|
||||
# 4. 作为音频捕获设备(例如,虚拟麦克风)
|
||||
|
||||
如果您想使用IP Camera Bridge作为虚拟麦克风,您应该使用以下应用程序的最新版本。 这些应用程序可以通过网络和IP Camera Bridge将他们捕获的音频传输到Windows应用程序。
|
||||
|
||||
* USB Camera for Android https://play.google.com/store/apps/details?id=com.shenyaocn.android.usbcamera
|
||||
* IP Camera for Android https://play.google.com/store/apps/details?id=com.shenyaocn.android.WebCam
|
||||
* IP Camera for iOS https://itunes.apple.com/app/id990605467
|
||||
* IP Camera for Mac https://itunes.apple.com/cn/app/id1176420716
|
||||
* IP Camera for Windows https://www.microsoft.com/store/apps/9wzdncrdmdrm
|
||||
|
||||
# 5. 卸载
|
||||
|
||||
关闭所有程序,运行uninstall.bat,并在弹出UAC提示框时点击“是”, **IP Camera Bridge将会从磁盘上移除。**
|
12
note_by_camera/README.md
Normal file
12
note_by_camera/README.md
Normal file
@ -0,0 +1,12 @@
|
||||
# note_by_camera
|
||||
将摄像头下写在纸上的文字显示在屏幕上。
|
||||
|
||||
method1.py是完全灰度
|
||||
|
||||
method2.py是mask的。
|
||||
|
||||
需要opencv-python和numpy
|
||||
|
||||
界面是tkinter。
|
||||
|
||||
Todo:运用腐蚀等算法优化
|
47
note_by_camera/console.ipynb
Normal file
47
note_by_camera/console.ipynb
Normal file
@ -0,0 +1,47 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 22,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"5\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"import numpy as np\r\n",
|
||||
"arr=np.asarray([1,[2,2],3])\r\n",
|
||||
"print(np.bitwise_and(0b111,arr))"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"interpreter": {
|
||||
"hash": "1baa965d5efe3ac65b79dfc60c0d706280b1da80fedb7760faf2759126c4f253"
|
||||
},
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3.8.2 64-bit",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.8.2"
|
||||
},
|
||||
"orig_nbformat": 4
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
41
note_by_camera/method1.py
Normal file
41
note_by_camera/method1.py
Normal file
@ -0,0 +1,41 @@
|
||||
import cv2
|
||||
import numpy as np
|
||||
import tkinter as tk
|
||||
from PIL import Image,ImageTk
|
||||
|
||||
root=tk.Tk()
|
||||
root.attributes("-transparentcolor","white")
|
||||
cam=cv2.VideoCapture(2)
|
||||
img12=cv2.imread('img.jpg')
|
||||
print(1)
|
||||
# lab=tk.Label(root,text="212",image=img2)
|
||||
|
||||
success,img=cam.read()
|
||||
can=tk.Canvas(root,width=1920,height=1080)
|
||||
def main():
|
||||
success,img=cam.read()
|
||||
img=cv2.resize(img,None,fx=1,fy=1)
|
||||
# cv2.imshow('img',img)
|
||||
|
||||
#转换hsv
|
||||
grey=cv2.cvtColor(img,cv2.COLOR_RGB2GRAY)
|
||||
#获取mask
|
||||
mask = cv2.inRange(grey, 0, 130)
|
||||
ans=np.array(255-mask)
|
||||
# cv2.imshow('Mask', ans)
|
||||
fortk=Image.fromarray(ans)
|
||||
img2=ImageTk.PhotoImage(image=fortk)
|
||||
can.create_image((320,300),image=img2)
|
||||
can.pack()
|
||||
can.update()
|
||||
root.update()
|
||||
cv2.imshow("raw",img)
|
||||
cv2.imshow("ans",ans)
|
||||
cv2.waitKey(50)
|
||||
|
||||
# img2=ImageTk.PhotoImage(image=Image.fromarray(img12))
|
||||
|
||||
while True:
|
||||
main()
|
||||
cv2.waitKey(0)
|
||||
cv2.destroyAllWindows()
|
50
note_by_camera/method2.py
Normal file
50
note_by_camera/method2.py
Normal file
@ -0,0 +1,50 @@
|
||||
import cv2
|
||||
import numpy as np
|
||||
import tkinter as tk
|
||||
from PIL import Image,ImageTk
|
||||
|
||||
root=tk.Tk()
|
||||
root.attributes("-transparentcolor","white")
|
||||
cam=cv2.VideoCapture(2)
|
||||
# img12=cv2.imread('img.jpg')
|
||||
print(1)
|
||||
# lab=tk.Label(root,text="212",image=img2)
|
||||
|
||||
success,img=cam.read()
|
||||
can=tk.Canvas(root,width=1920,height=1080)
|
||||
def main():
|
||||
# cv2.waitKey(5000)
|
||||
success,img=cam.read()
|
||||
# img=cv2.imread('img.jpg')
|
||||
img=cv2.resize(img,None,fx=1,fy=1)
|
||||
x,y,_=img.shape
|
||||
cv2.imshow("raw",img)
|
||||
|
||||
#转换hsv
|
||||
grey=cv2.cvtColor(img,cv2.COLOR_RGB2GRAY)
|
||||
#获取mask
|
||||
mask = cv2.inRange(grey, 150, 255)
|
||||
mask=cv2.cvtColor(mask,cv2.COLOR_GRAY2RGB)
|
||||
# for i in range(x):
|
||||
# for j in range(y):
|
||||
# if mask[i,j]==0:
|
||||
# img[i,j]=(255,255,255)
|
||||
ans=cv2.add(img,mask)
|
||||
cv2.imshow('Mask', mask)
|
||||
fortk=Image.fromarray(cv2.cvtColor(ans,cv2.COLOR_RGB2BGR))
|
||||
img2=ImageTk.PhotoImage(image=fortk)
|
||||
can.create_image((320,300),image=img2)
|
||||
can.pack()
|
||||
can.update()
|
||||
root.update()
|
||||
|
||||
cv2.imshow("ans",ans)
|
||||
cv2.waitKey(100)
|
||||
|
||||
# img2=ImageTk.PhotoImage(image=Image.fromarray(img12))
|
||||
|
||||
while True:
|
||||
main()
|
||||
# main()
|
||||
cv2.waitKey(0)
|
||||
cv2.destroyAllWindows()
|
2
note_by_camera/requements.txt
Normal file
2
note_by_camera/requements.txt
Normal file
@ -0,0 +1,2 @@
|
||||
opencv-python
|
||||
numpy
|
Reference in New Issue
Block a user