• python+open cv调用手机摄像头,保存文件
    2021-03-17 03:27:18

    import cv2

    cv2.namedWindow("camera", 1)

    # 开启ip摄像头

    video = "http://admin:admin@" # 此处@后的ipv4 地址需要改为app提供的地址

    cap = cv2.VideoCapture(video)

    #  开摄像头

    # while True:

    # # Start Camera, while true, camera will runq


    # ret, image_np = cap.read()


    # # Set height and width of webcamq

    # height = 600

    # width = 1000


    # # Set camera resolution and create a break function by pressing 'q'

    # cv2.imshow('object detection',image_np)# cv2.resize(image_np, (width, height)))

    # if cv2.waitKey(25) & 0xFF == ord('q'):

    # cap.release()

    # cv2.destroyAllWindows()

    # break

    # print(cap.get(cv2.cv2.CAP_PROP_FRAME_COUNT))

    # # Clean up

    # cap.release()

    # cv2.destroyAllWindows()


    fps = 30

    size = (int(cap.get(cv2.CAP_PROP_FRAME_WIDTH)), int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT)))

    # 调用VideoWrite()函数

    videoWrite = cv2.VideoWriter('MySaveVideo.avi', cv2.VideoWriter_fourcc('I', '4', '2', '0'), fps, size)

    # 先获取一帧,用来判断是否成功调用摄像头

    success, frame = cap.read()

    # 通过设置帧数来设置时间,减一是因为上面已经获取过一帧了

    numFrameRemainling = fps * 10 - 1

    # 通过循环保存帧

    while success and numFrameRemainling > 0:


    success, frame = cap.read()

    numFrameRemainling -= 1

    # 释放摄像头


  • 禁用ubuntu 摄像头Once a concern that was the province of the paranoid, years worth of reports and revelations have made it readily apparent that people really can spy on you through your webcam.Here’...
    禁用ubuntu 摄像头

    禁用ubuntu 摄像头

    Once a concern that was the province of the paranoid, years worth of reports and revelations have made it readily apparent that people really can spy on you through your webcam. Here’s why you should disable or cover yours.

    曾经是一个偏执狂的省,多年的报告和启示使人们很明显可以通过您的网络摄像头监视您。 这就是为什么您应该禁用或覆盖自己的原因。

    TL;DR version: Script-kiddie hackers and teenagers can, and do, use easily accessible tools and phishing techniques to hijack webcams of unsuspecting people, often who they know, and watch them through their camera. They can store images and videos of people in compromising situations in their bedrooms, and many of these images and videos are uploaded to shady websites.

    TL; DR版本:脚本犯罪的黑客和青少年可以并且确实使用易于访问的工具和网络钓鱼技术来劫持那些毫无戒心的人(通常是他们认识的人)的网络摄像头,并通过相机对其进行监视。 他们可以将处于困境的人的图像和视频存储在他们的卧室中,其中许多图像和视频都上传到了阴暗的网站。

    If you have kids, you should strongly consider reading the entirety of this article and implementing something to stop their webcams from being on all the time (or ever).


    网络摄像头真的是一种威胁吗? (Is Webcam Spying Really a Threat?)

    Ten years ago the idea that people—be they government agents, hackers, or just law-breaking voyeurs—could actively spy on you through your computer’s webcam would be the considered the ramblings of a paranoid conspiracy theorist. A slew of news stories over the intervening years, however, have revealed that what was once considered paranoia is now an uncomfortable reality.

    十年前,人们(无论是政府人员,黑客还是只是违法的偷窥者)可以通过计算机的网络摄像头主动监视您的想法被认为是偏执的阴谋理论家的the。 然而,在过去的几年中,大量的新闻报道表明,曾经被认为是偏执狂的现在已成为令人不快的现实。

    In 2009, a student sued his school when he discovered his school-provided laptop was secretly photographing him (the ensuing legal investigation revealed that the school had collected 56,000 photographs of students without their knowledge or consent). In 2013, researchers demonstrated that they could activate the webcam on MacBooks without the indicator light turning on, something previously considered impossible. A former FBI agent confirmed that not only was this possible but that they’d been doing it for years.

    2009年,一名学生起诉学校,当时他发现学校提供的笔记本电脑正在暗中给他照相(随后的法律调查显示,该学校在未经学生知情或同意的情况下收集了56,000张学生照片)。 在2013年,研究人员证明了他们可以在不打开指示灯的情况下激活MacBooks上的网络摄像头,而以前这是不可能的。 联邦调查局(FBI)的前一位经纪人证实,这不仅是可能的,而且他们已经做了多年

    In 2013, courtesy of the documents leaked by Edward Snowden, we learned that the NSA had successful programs they used to gain backdoor access to the cameras on iPhones and Blackberries. In 2014, again courtesy of the Snowden leaks, we learned that the NSA has a host of tools at its disposal to remotely monitor users like “Gumfish”: a malware tool that allows for remote video monitoring via your webcam. In early 2015, a group known as BlackShades was broken up after it was discovered that the software they sold for $40 a pop had been used to give millions of purchasers remote access (including webcam access) to victims computers; that’s hardly a new trick though as old programs like Back Orifice were used in the same fashion back in the 1990s.

    2013年,根据爱德华·斯诺登(Edward Snowden)泄露的文件,我们了解到,美国国家安全局(NSA)拥有成功的程序,可以用来对iPhone和Blackberry上的相机进行后门访问。 2014年,再次由于斯诺登漏洞的影响,我们获悉,美国国家安全局(NSA)拥有大量工具可用于远程监控用户,例如“ Gumfish” (一种允许通过网络摄像头进行远程视频监控的恶意软件)。 2015年初,一个名为BlackShades的组织被解散,原因是该组织发现他们以40美元的价格出售的该软件已被用于为数百万购买者提供对受害者计算机的远程访问(包括网络摄像头访问) ; 尽管在1990年代以同样的方式使用了诸如Back Orifice之类的旧程序,但这并不是什么新技巧。

    It’s Not Just the NSA


    We want to emphasize the whole “hardly a new trick” bit and the ease with which even marginally skilled malicious users can gain access to your computer. This article over at Ars Technica, Meet The Men Who Spy On Women Through Their Webcams, is an unsettling account. The majority of people doing the spying aren’t government agents, but low-tier hackers that use simple tools to catalog and monitor all the devices a computer may have access to.

    我们要强调整个“几乎不是新技巧”,甚至强调即使是技术娴熟的恶意用户也可以轻松访问您的计算机。 这篇在Ars Technica上发表的文章《通过网络摄像头见识对女性进行监视的男人》是令人不安的。 从事间谍活动的大多数人不是政府人员,而是使用简单工具对计算机可能访问的所有设备进行分类和监视的低级黑客。

    So before you shrug your shoulders and say, “Well the NSA doesn’t care about my boring life, so it doesn’t matter,” understand that while we might all find allegations of government spying the most troubling on a global and intellectual level, the majority of actual webcam spying is carried out by creepy Peeping Toms.

    因此,在您耸耸肩膀说:“ NSA不在乎我无聊的生活,没关系的时候”,请理解,尽管我们都可能发现政府在全球和知识层面上对间谍进行了最令人不安的指控,大多数实际的网络摄像头间谍活动都是由令人毛骨悚然的“偷窥狂”进行的。

    So the short of it is: yes, webcam spying is a real threat. When everyone from the spooks at the NSA to the kid next door has access to tools that can turn a webcam against its owner then the threat is legitimate.

    因此,它的不足是:是的,网络摄像头监视是一种真正的威胁。 当每个人(从对国家安全局(NSA)的恐惧到隔壁的孩子)都能使用可以使网络摄像头对付所有者的工具时,威胁就是合法的。

    我该怎么办? (What Should I Do?)

    You should, no questions asked, disable or obscure your computer’s webcam. There is no good reason, especially in light of the numerous documented cases of webcam spying, to leave an insecure recording device permanently accessible on your computer. It’s so easy to do that there’s no reason not to. Here’s what you should consider.

    毫无疑问,您应该禁用或遮盖计算机的网络摄像头。 没有充分的理由,特别是鉴于有许多记录在案的网络摄像头间谍案,使不安全的记录设备可以在计算机上永久访问。 这样做非常容易,没有理由不这样做。 这是您应该考虑的。

    确保您正在使用防病毒软件 (Make Sure You’re Using Antivirus)

    While antivirus isn’t going to detect all of these things, and won’t detect many of the latest ones that are out there, it will at least help in dealing with the possibility of infection through a link or running the wrong executable. Here are the programs we recommend.

    虽然防病毒并不能检测所有这些东西,也不会检测到许多最新的东西,但它至少可以帮助解决通过链接感染或运行错误的可执行文件的可能性。 这是我们推荐的程序

    The problem is that if the threat is actually the college kid that offers to help people with their IT problems, they can easily whitelist a trojan so an antivirus won’t detect it. Or malware could do the same thing.

    问题在于,如果威胁实际上是提供帮助人们解决IT问题的大学生,他们可以轻松地将特洛伊木马列入白名单,以便防病毒软件无法检测到它。 或恶意软件可以做同样的事情。

    You can’t really trust that little icon that says you are secure. But it’s at least a help.

    您真的不能相信那个表明您安全的小图标。 但这至少是一个帮助。

    拔掉 (Unplug It)

    For desktop users with external webcams, the easiest solution is to simply unplug the USB webcam. No amount of hacking is going to magically plug an unplugged device back in.

    对于具有外部网络摄像头的桌面用户,最简单的解决方案是只需拔下USB网络摄像头。 没有任何黑客手段可以神奇地将未插入的设备重新插入。

    This is the solution we use around the How-To Geek offices; we leave the webcams in their usual position atop their respective workstation monitors and then when we need to use them we plug the USB cable into an easily accessible front or top USB port on the said workstation.

    这是我们在How-To Geek办事处周围使用的解决方案; 我们将网络摄像头放置在其各自工作站监视器顶部的通常位置,然后在需要使用它们时,将USB电缆插入所述工作站上易于访问的正面或顶部USB端口。

    It’s the most foolproof way to approach the problem if you have an external webcam, and works regardless of the hardware or operating system.


    在BIOS中禁用它 (Disable It in the BIOS)

    If you have a laptop with an integrated webcam (or a rare all-in-one desktop model that also sports an integrated webcam), you have a few options. If your BIOS supports it, you can disable it at the BIOS level, which is ideal.

    如果您的笔记本电脑带有集成的网络摄像头(或者罕见的多机合一台式机型号也带有集成的网络摄像头),则有几种选择。 如果您的BIOS支持,则可以在BIOS级别将其禁用,这是理想的选择。

    Reboot your computer and enter into the BIOS (follow the on-screen instructions to enter “SETUP”, typically by pressing the F2 key, the DEL key, or a function key combination of some sort). Look through the BIOS options for an entry labeled something like “webcam,” “integrated camera,” or “CMOS camera.” These entries will typically have a simple toggle, like enable/disable or lock/unlock. Disable or lock the hardware to turn off your webcam.

    重新启动计算机并进入BIOS(按照屏幕上的说明输入“ SETUP”,通常是按F2键,DEL键或某种功能键的组合)。 在BIOS选项中查找带有“网络摄像头”,“集成摄像头”或“ CMOS摄像头”之类的条目。 这些条目通常具有简单的切换,例如启用/禁用或锁定/解锁。 禁用或锁定硬件以关闭网络摄像头。

    Unfortunately, the BIOS solution is relatively rare and typically found on computers from vendors with heavy institutional sales. Business Dell and Lenovo laptops, for example, commonly ship with this feature in the BIOS because their corporate buyers want the ability to disable the webcam. With other vendors (and even within computer lines from the aforementioned vendors) it’s hit or miss.

    不幸的是,BIOS解决方案相对较少,通常可以在机构销售量大的供应商的计算机上找到。 例如,商用戴尔和联想笔记本电脑通常会在BIOS中附带此功能,因为其公司购买者希望能够禁用网络摄像头。 与其他供应商(甚至在上述供应商的计算机产品线中)一样,它的成功或失败。

    Be forewarned that disabling the webcam typically disables the microphone too, as in most laptops the camera and microphone module are on the same small expansion board. This is obviously a benefit (from a privacy standpoint) but you should be aware of it so you’re not left wondering why your mic is dead.

    请注意,禁用网络摄像头通常也会同时禁用麦克风,因为在大多数笔记本电脑中,摄像头和麦克风模块位于同一块小型扩展板上。 从隐私的角度来看,这显然是一种好处,但是您应该意识到这一点,因此您不会怀疑自己的麦克风为何死了。

    在操作系统中禁用它 (Disable It in the OS)

    This solution isn’t quite as secure or foolproof, but it’s a welcome next step. You can cripple your webcam by disabling it and removing driver support for it.

    该解决方案虽然不那么安全或万无一失,但值得欢迎。 您可以通过禁用网络摄像头并删除驱动程序支持来削弱网络摄像头的性能。

    The technique for doing so varies from operating system to operating system, but the general premise is the same. In Windows, you just need to enter the Device Manager (click Start and search for “device manager” to find it). There, you can locate your webcam under the “Imaging Devices” category, right-click it, and choose “Disable” or “Uninstall”.

    这样做的技术因操作系统而异,但总体前提是相同的。 在Windows中,您只需要输入设备管理器(单击“开始”并搜索“设备管理器”以找到它)。 在此处,您可以将网络摄像头定位在“成像设备”类别下,右键单击它,然后选择“禁用”或“卸载”。

    Obviously this isn’t a perfect solution. If someone has remote administrative access to your machine they can always, with a greater or lesser degree of hassle, install the missing drivers and enable the device again.

    显然,这不是一个完美的解决方案。 如果某人对您的计算机具有远程管理访问权限,那么他们总是可以(或多或少)麻烦地安装缺少的驱动程序,然后再次启用设备。

    Barring that kind of focus and determination, however, it’s a simple and easy way to disable your webcam. It is, however, rather inconvenient if you actually use your integrated webcam with any regularity. This brings us to the next solution: obscuring the lens with a cover.

    但是,除非有这种关注和决心,否则这是禁用网络摄像头的简单方法。 但是,如果您实际以任何规律性使用集成网络摄像头,则将非常不便。 这将我们带入下一个解决方案:用盖子遮盖镜头。

    掩盖 (Cover It Up)

    A compromise between the hassle of disabling the the webcam in the BIOS or operating system and leaving it wide open all the time is applying a simple physical cover to your webcam lens. As elementary and simplistic as it seems, it’s actually a really effective technique. You get instant visual confirmation that the lens is disabled (you can see the cover every time you look at your laptop), it’s easy to remove, and we even tried out some dirt cheap DIY options that keep the cover-up option economical.

    在BIOS或操作系统中禁用网络摄像头并始终使其始终敞开的麻烦之间的折衷方案是为网络摄像头镜头提供简单的物理保护罩。 尽管看起来很简单,但它实际上是一种非常有效的技术。 您会立即获得视觉确认,确认镜头已被禁用(每次您看笔记本电脑时都可以看到盖子),它很容易卸下,我们甚至尝试了一些便宜的DIY选件,以使遮盖选件更加经济。

    Presented below, for reference, is the laptop we’re using without any of the solutions (commercial or DIY) applied. The indicator light is on the left, the webcam lens is center, and the microphone is on the right.

    下面提供的是供我们参考的笔记本电脑,其中没有应用任何解决方案(商业或DIY)。 指示灯在左侧,网络摄像头在中央,麦克风在右侧。

    Before you run off to grab a roll of duct tape, let’s run through some of the more convenient commercial options.


    眼罩($ 6) (Eyebloc Cover (~$6))

    The Eyebloc is the best selling and the most reviewed webcam cover on Amazon. The design is really simple: it’s a C-shaped plastic clamp that you slip onto your laptop (it can also be applied to tablets and smartphones in a similar fashion).

    Eyebloc是亚马逊上最畅销,最受好评的网络摄像头。 设计非常简单:它是一个C形塑料夹,您可以将其滑到笔记本电脑上(也可以类似的方式应用于平板电脑和智能手机)。

    No doubt about it, it was easy to apply, easy to remove, and as advertised it had no adhesive to speak of (so there was no risk of residue). It also completely blocked the webcam lens on all devices we tested it on. That said, this thing is really, really, ugly and obvious. In terms of style we’d rank the Eyebloc right up there with the massive fit-over-sunglasses you’d see around a retirement community.

    毫无疑问,它易于施工,易于去除,并且如广告所示没有粘合剂可言(因此没有残留风险)。 它也完全挡住了我们测试过的所有设备上的网络摄像头。 就是说,这件事真的,真的,丑陋且显而易见。 就款式而言,我们会将Eyebloc与您在退休社区中看到的大型太阳镜搭配在上面。

    This is also the only device we tested that won’t work very well for smart TVs, game consoles, or any other larger device that has a webcam-like device built in. If you’re not attaching it to a slender object like a laptop lid or tablet, it won’t work.


    C-Slide(〜$ 5) (C-Slide (~$5))

    The C-Slide is a tiny (and we do mean tiny) plastic slider that you adhere onto your laptop or tablet. The entire device is the size of a very small mailing label (1.4″ x 0.5″ and a scant 1mm or so thick). It’s so tiny, in fact, that it was delivered stuck to a piece of cardstock in a common #10 business envelope and the outside of the envelope had “Your webcam cover order is inside!” in large highlighted print to, presumably, ensure we didn’t scrap it as junk mail.

    C-Slide是一个很小的(并且我们的意思是很小的)塑料滑块,您可以将其粘贴到笔记本电脑或平板电脑上。 整个设备的尺寸只有很小的邮寄标签(1.4英寸x 0.5英寸,厚度只有1毫米左右)。 实际上,它是如此之小,以至于它被粘在一张卡片纸上,放在一个普通的#10商业信封中,信封的外面写着“您的网络摄像头封面订单在里面!” 以大字体突出显示,以确保我们不会将其作为垃圾邮件报废。

    Unlike the other solutions in this roundup the C-Slide is intended for permanent application to the device. You enable and disable the webcam by sliding the tiny little panel of plastic back and forth to open and close the webcam much like some larger external webcams have a physical slider that covers the lens when not in use.

    与本综述中的其他解决方案不同,C-Slide旨在永久性地应用于设备。 您可以通过前后滑动小的塑料小面板来打开和关闭网络摄像头,以启用和禁用网络摄像头,就像一些较大的外部网络摄像头具有不使用镜头时遮盖镜头的物理滑块一样。

    Despite our misgivings about how tiny the C-Slide is, it worked quite well. It’s so slim that you can easily close the laptop without any noticeable gap between the lid and body. There were only two issues we found with the C-Slide.

    尽管我们对C-Slide的体积有疑虑,但它的效果还是不错的。 它非常纤薄,您可以轻松关闭笔记本电脑,而盖子和机身之间没有任何明显的缝隙。 我们发现C-Slide只有两个问题。

    First, if you have a laptop that has a curved bezel, it does not adhere very well and will likely fall off immediately (or shortly after application). Second, you’ll want to place it very carefully so that it doesn’t accidentally stick over the microphone hole on your laptop or cover the indicator light. Second, before you peel the double-sided tape off the back and slap it on, take a minute to experiment with placement. Our initial placement was less than ideal, as it blocked the indicator light and resulted in a blocked microphone when the slider was open. By offsetting the opening in the slider slightly from the webcam lens we were able to position the device such that the microphone wasn’t obscured or taped over and the only time the indicator light was blocked was when we had the slider open to use the webcam.

    首先,如果您的笔记本电脑具有弯曲的边框,那么它的粘合性就不会很好,并且可能会立即脱落(或在使用后不久脱落)。 其次,您需要非常小心地放置它,以免它意外地粘在笔记本电脑上的麦克风Kong上或覆盖指示灯。 其次,在从背面撕下双面胶带并将其拍打之前,请花一分钟时间尝试放置。 我们最初放置的位置不理想,因为它挡住了指示灯并在滑杆打开时导致麦克风被挡住了。 通过使滑块上的开口相对于摄像头镜头略微偏移,我们能够定位设备,以使麦克风不会被遮挡或粘住,并且只有当我们打开滑块才能使用摄像头时,指示灯才被遮挡。

    Those minor issues aside, the C-Slide will work on any camera embedded in a flat surface so long as the camera lens is smaller than the roughly square centimeter opening of the slider (approximately the size of the nail on your pinky finger). Overall this was our favorite solution. It’s easy to apply and it’s easy to use: no picking at a little sticky disk and no misplaced parts.

    除了那些小问题,C-Slide可以在任何嵌入平面的相机上使用,只要相机镜头的直径小于滑块的大约平方厘米的开口(大约是手指上指甲的大小)即可。 总体而言,这是我们最喜欢的解决方案。 它易于应用且易于使用:不会在小的粘性磁盘上进行拾取,也不会放置任何零件。

    创意凸轮罩(6美元约10美元) (Creative Cam Covers (~$10 for 6))

    The Creative Cam Covers feel and look very similar to cut vinyl decal clings like those you would order from a sign shop or purchase to peel out and stick on your car window. The pack comes with an alcohol wipe and six black circular clings roughly the size of a dime. They have no adhesive, but instead use static electricity to cling to smooth surfaces.

    Creative Cam Covers的感觉和外观与切好的乙烯基贴花附着物非常相似,例如您可以从标志店订购或购买的东西,以剥落并粘贴在车窗上。 该包装配有酒精擦拭布和六个黑色硬币,大约一角钱的大小。 它们没有粘合剂,而是使用静电附着在光滑的表面上。

    This is both a benefit (no sticky residue and they’re easy to remove) and a flaw (they work great on smooth surfaces but not so great on textured ones). As such, they work super well on laptops with glossy piano black bezels and tablets that have smooth glass bezels, but if your laptop is brushed aluminum (like a MacBook) or just has a rough texture on the bezel, you may find they readily fall off.

    这既有好处(没有粘性残留物,很容易清除),也有缺陷(它们在光滑的表面上效果很好,但在有纹理的表面上效果不太好)。 因此,它们在带有光滑钢琴黑边框和平板电脑且玻璃边框光滑的平板电脑上表现出色,但是如果您的笔记本电脑采用拉丝铝(例如MacBook)或边框上有粗糙纹理,您可能会发现它们容易掉落关。

    In light of that, we can only recommend the product for those situations: super smooth and flat laptop bezels or glass surfaces like those found on tablets. None of our laptops have a gloss case and the Cam Covers would not stick (even for a fraction of a second) to the bezel of the laptop we used for demonstration purposes in this article. They did, however, stick incredibly well to the perfectly smooth glass surface of our iPad mini, as seen in the photo above. If you’re looking for a non-adhesive solution for a tablet or laptop with a gloss bezel this is a great solution.

    有鉴于此,我们仅在以下情况下推荐该产品:超光滑,平整的笔记本电脑边框或玻璃表面,如平板电脑上的那些。 我们的笔记本电脑都没有带光泽的保护套,并且Cam Covers不会粘在笔记本电脑的边框上(即使在不到一秒钟的时间内),我们在本文中将其用作演示目的。 但是,它们确实很好地贴在了iPad mini完美光滑的玻璃表面上,如上图所示。 如果您正在寻找具有光泽边框的平板电脑或笔记本电脑的非粘性解决方案,那么这是一个很好的解决方案。

    DIY电气胶带套(<$ 1) (DIY Electrical Tape Covers (< $1))

    While field testing all these solutions, it occurred to us that if you weren’t afraid of a tiny bit of adhesive then the cheapest solution would be to simply punch a hole in a piece of electrical tape with a hole punch and you’d have a perfectly round little dot you could place right over the lens of your integrated webcam.


    A quick trip to the old supply closet for some tape, a hole punch, and FedEx label (to steal a bit of the non-stick paper backing) and we had the fixings for hundreds of webcam covers.


    The only downside to this technique is that, yes, you’ll potentially have a little adhesive to deal with when removing the dot (although this is mostly a temperature-related issue, as electrical tape doesn’t have much residue when used in cooler temperatures). It would also be easy to lose or mangle the little dot of tape if you were using it while traveling about, but given how cheap they are to make you could easily stash a few in your laptop bag.

    这项技术的唯一缺点是,是的,在去除点时,您可能会需要一点胶粘剂来处理(尽管这主要是与温度相关的问题,因为冷却器中使用的电气胶带没有太多残留物)温度)。 如果您在旅行时使用磁带,也会很容易丢失或弄乱磁带的小点,但是鉴于它们的便宜程度,您可以轻松地将一些磁带藏在笔记本电脑包中。

    Armed with the tips we’ve shared on disabling or covering your webcam you can easily avoid the unfortunate reality of webcam snooping and reduce or outright eliminate webcam-based privacy breaches.


    翻译自: https://www.howtogeek.com/210921/how-to-disable-your-webcam-and-why-you-should/

    禁用ubuntu 摄像头

  • 1、禁止使用摄像头,听到这里是不是很懵逼,怎么能让手机摄像头不让用呢? 2、禁止屏幕截图,当时就是一脑袋❓ 3、禁止连接数据线传输数据 当时看到这三个要求我就是个懵逼状态,最好终于找到了解决办法。 查阅...








    首先,我们要下载一个mac电脑上应用 Apple Configurator2,先给大家看一个效果图。





    第一步,打开Apple Configurator,点击文件->新建->新建描述文件


























    /// 获取手机摄像头权限 , YES 摄像头可以使用
    + (int)determineThePhoneHasTheCameraOn
    { /// 先判断摄像头硬件是否好用
        __block int type = 11111;
        if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
            [AVCaptureDevice requestAccessForMediaType:AVMediaTypeVideo completionHandler:^(BOOL granted) {//相机权限
                  if ( granted ) {
                      type = 1;
                      type = 2;
        } else {
            type = 0;
        return type;




  • 问题:在一个项目开发的过程中,发生摄像头权限申请时,若点击了拒绝摄像头权限,应用程序出现奔溃问题,如下: 解决办法: 需要两种方法同时验证是否具有摄像头使用权限: 方法一: /** * 通过系统的检查权限方法...





         * 通过系统的检查权限方法检查
        public static boolean isCameraGranted(Context context) {
            return ContextCompat.checkSelfPermission(context, CAMERA) == PackageManager.PERMISSION_GRANTED;


         * 通过try-cache检查当前状态下摄像头权限,测试当前摄像头能否被使用
        public static boolean isCameraCanUse() {
            boolean canUse = true;
            Camera camera = null;
            try {
                camera = Camera.open(0);
            } catch (Exception e) {
                canUse = false;
            if (canUse) {
                camera = null;
            return canUse;


  • 现有的智能手机是可以充当Wifi摄像头来使用的,这就需要装一个App就能实现了,如果是用别的下载来APP安装用来会不会不放心呢,如果自己有能力,那就可以通过开发Android App项目过程来实现视频监控,有兴趣的来看看...
  • HTML5调用手机摄像头

    2016-01-12 17:57:12
    >  ...head>  meta charset="UTF-8">  title>Insert title heretitle>  head>  body>  video id="video" autoplay=""style='width:640px;height:480px'>video>  div>button id='picture' style=
  • 还是之前公司的那个需求,为满足客户需要,必须能够远程控制手下手机的相机和录音功能,之前能够使用设备管理器来禁用摄像头,但是毕竟需要手机使用者来手动点击确定激活的选项,这点就不是很美丽,虽然那个点击的...
  • 好久没有写博客,最近刚做完react 调用手机摄像头识别二维码的功能,做的过程中遇到了好多问题,也百度了很多方法结合实际情况最终实现了此功能。 在实现的过程中有很多都是在原声的HTML和JS里实现的,拿过来改改就...
  • <!DOCTYPE HTML><html><head> <title>上传图片</title> <meta charset="utf-8"></head>...iframe name="uploadfrm" id="uploadfrm" style="display: none;"...
  • 描述 这个简单的扩展程序提供了一些选项,可以将您的麦克风和/或摄像头默认设置为禁用。 下载 作者 @burkybang 截屏
  • 最近有人问吾,安卓手机,插入OTG摄像头以后,就没法录音了。吾试了一下,应该是摄像头自带MIC,系统给自动切换过去了。他问吾,有没有办法继续在手机这边录音?吾试了几个方法都没用。具体来说:  那么,有没有哪...
  • 主要介绍了Vue调用手机相机及上传,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
  • 处理办法就是禁用这个插件 ... mui-当使用addeleventlisener()方法绑定事件时选择器无法绑定事件 在mui中绑定事件不能用jQuery或mui(“#XX”)的形式选取某个元素,而是document.getelementbyid()的形式 mui(“#XX”...
  • 可选方案3(最终方案):Android Device Administration API禁用相机功能 Android Device Administration API 是Android 用来提供企业应用支持的,通过API可以在系统级别提供密码管理、停用相机等设备管理功能。...
  • case CHOOSE_PHOTO: if(resultCode==RESULT_OK){ //判断手机版本号 if(Build.VERSION.SDK_INT>=19){ handleImageOnKitKat(data); } else{ handleImageBeforeKitKat(data); } } default: break; } } public void ...
  • Android 前置摄像头强制关闭镜像预览

    千次阅读 2021-12-06 15:25:09
    Android 中对于摄像头处理分为前置摄像头和后置摄像头 1、Camera.CameraInfo.CAMERA_FACING_FRONT :前置摄像头 2、Camera.CameraInfo.CAMERA_FACING_BACK:后置摄像头 base/core/java/android/hardware/Camera....
  • 1,首先来说打开摄像头 html部分 <div style="height:300px;width:600px;"> <video id="video" width="300px" height="300px" autoplay="autoplay"> </video> <canvas class="zp" id=...
  • 展开全部html5需要使用接口chrome30+forandroid已经实现了利用webcam,调用手机后置摄像62616964757a686964616fe4b893e5b19e31333361326262头,代码如下:html>...varaudio,...
  • 在开发H5的时候一般都会遇到同时调取手机相册与摄像头的需求。在开发中也会遇到各种兼容。 <input type="file"> <!--accept - 规定可提交的文件类型 --> <!-- capture - 系统所捕获的默认设备。...
  • 页面结构效果预览 打开摄像头关闭摄像头拍照js部分export default {data() {return {videoWidth: 250,videoHeight: 350,imgSrc: "",thisCancas: null,thisContext: null,thisVideo: null,openVideo:false};...
  • 虚拟摄像头测试

    千次阅读 2019-05-31 12:32:06
    安装xawtv sudo atp-get install xawtv 查看内核版本 uname -a 下载相近版本内核 我下载内核版本是\linux- ubuntu版本是2.6.32-21 把源码/Media/video目录拷贝到...linux-headers-2.6.32-21 linux...
  • 安卓手机当电脑摄像头(DroidCam网盘及使用方法)

    万次阅读 多人点赞 2018-09-11 18:20:01
    最近校招笔试,没有摄像头,所以打起了手机摄像头的主意,搜了一下,网上的安装包很旧,有的用不了,使用讲的也不全,所以我从官网和Google商店重新下了一遍。 安装环境: 笔记本 win10专业版 手机 小米mix2s,...
  • 微博相关话题高居微博热议话题第二位,阅读数已超6700万 在相关话题内,网友们也纷纷表示手机总知道我在想什么,总会推送相关的广告信息或者在购物网站内推送感兴趣的产品信息手机作为出门三大件之一,每天平均使用...
  • 主项目当前禁用了mediaDevices.getUserMedia(),所以你需要再次启用它,你还需要添加一个sourceId选项的检查,稍后我们将在ARController.getUserMediaThreeScene()调用中添加它. . 您可以在this fork中找到这些编辑的...
  • Demo:摄像头CSI的拍照程序树莓派摄像头笔者买的不是USB网络摄像头,而是通过扩展排线插入摄像头摄像头参数和结构如下: 接线图 启用摄像头sudo raspi-config 然后重启树莓派。使用raspistill命令行操作摄像头...
  • 在iPhone iPhone上以网络摄像头的形式显示全屏摄像头,...(可选)在视频上双击以完全填满屏幕在iPhone上启用飞行模式以禁用推送通知使用避雷线将iPhone连接到Mac将您的手机屏幕镜像为Mac上的虚拟相机下载,安装和操作
  • Unity打开摄像头

    千次阅读 2020-12-29 08:44:17
    } } //禁用此脚本时停止摄像头 private void OnDisable() { if (Application.HasUserAuthorization(UserAuthorization.WebCam) && webCameraTexture != null) { webCameraTexture.Stop(); } } void Update() { //...
  • 设备管理器里面可以看到电脑所有硬件的驱动安装情况以及启用/禁用状态,有些设备由于某种因素会被暂时禁用,但是过一段时间又需要启用它,有些用户刚接触电脑不久,并不清楚被禁用的设备要如何重新开启,其实很简单...
  • 在设备管理器中禁用笔记本自带摄像头之后,打开Win10笔记本自带相机应用,即可使用这个免驱的USB摄像头了。 硬件连接 使用移动电源给WiFi数传模块供电。 WiFi数传模块的USB接口与摄像头相连。 WiFi数传模块的串口与...
  • 移动端H5web 用input type = file 在部分安卓手机上无法调起摄像头拍照,有的也无法访问相册而是直接访问了文档,解决办法是: 加上 accept = "image/*" 防止打开是的文档,加上mutiple="mutiple" 可以再打开的时候...



1 2 3 4 5 ... 20
收藏数 3,658
精华内容 1,463