video_vt1622
- 格式:pdf
- 大小:1.26 MB
- 文档页数:9


videofilereader用法-回复videofilereader是一个用于读取视频文件的类。
它提供了一种便捷的方法来从视频文件中获取帧,并且可以在实时应用程序或离线处理过程中使用。
在本文中,我将向您介绍videofilereader的用法,并提供一些示例代码和解释来帮助您更好地理解它的功能。
1. 导入videofilereader类和其他必要的库。
首先,我们需要将videofilereader类导入到我们的代码中。
这可以通过使用适当的导入语句来完成。
我们还需要导入其他必要的库,例如opencv 和numpy,以便在读取视频文件时进行图像处理和操作。
pythonimport cv2import numpy as npfrom videofilereader import VideoFileReader2. 创建videofilereader对象并打开视频文件。
接下来,我们需要创建一个videofilereader对象,并使用open方法打开要读取的视频文件。
当您调用open方法时,它将返回一个布尔值,指示文件是否成功打开。
pythonvideo_reader = VideoFileReader()file_path = "path/to/your/video/file.mp4" # 替换为您的视频文件路径if video_reader.open(file_path):print("视频文件已成功打开!")else:print("视频文件打开失败!")3. 读取视频文件并循环处理帧。
一旦我们成功打开了视频文件,就可以开始读取它的帧。
使用while循环,我们将一直读取帧直到到达视频文件的末尾。
在每次迭代中,我们可以调用read方法从当前位置读取下一帧。
此方法将返回两个值:一个布尔值,指示帧是否成功读取,以及当前帧的图像数据。
pythonwhile video_reader.is_opened():success, frame = video_reader.read()if success:# 在此处插入您的代码,对当前帧进行处理# 例如,您可以在图像上绘制一个矩形、应用滤镜或进行其他操作cv2.imshow("Video Frame", frame)else:break# 检测按键,如果用户按下'q'键则退出循环if cv2.waitKey(1) & 0xFF == ord('q'):breakcv2.destroyAllWindows()video_reader.release()在上面的示例代码中,我们检查了每一帧是否成功读取,并在成功读取时显示了当前帧。
s Recommended Operating Conditionss Electro-optical Characteristics (Current flowing into the device : +, Current flowing out of the device : −)*6 Specified by sampling test*7 6µW, φ50µm of DC light is applied to the center of each photodiode.Under that condition, sensitivity R pP is shown by following formula.R pP =|V pP −V odP |/6µWV pP : Output voltage when DC light is applied.V odP : Output voltage when DC light is not applied.*8 50µW φ50µm of DC light is applied to the center of each photodiode.Under that condition, sensitivity R pR is shown by following formula.R pR =|V pR −V odR |/50µWV pR : Output voltage when DC light is applied.V odR : Output voltage when DC light is not applied.*9 Playback mode : V MP/R =0V Recording mode : V MP/R =V CC .*10 Sensitivity response characteristics after switcing mode is specified in the sensitivity in 200µs after change of the modeswitcing voltage. Take measurement with 20µ W DC light radiated to the center of each photodiode at 50µm φ.R p =|V p −V od |/20µWParameter SymbolMIN.TYP.MAX.Unit Application Supply currentDark output voltage Dark output differential voltage I CCP I O C AK V MR V MP I MR I MP I CCR −−−−−−−−−−−9.0SensitivityV odP V nP V odPS R pP R pPt R pRP R pPRf CP V odR V nR1V nR2V odRS R pR R pE , R pFI dE , I dF R pRt f CR −−−−f =720kHz, BW =10kHzf =720kHz, BW =10kHzTa =−20 to +70°C−3dBf =22kHz, BW =1kHz Ta =−20 to +70°C−3dB∗10∗10−−−−−−−−−−−−1.60.4230Vcc −0.5Vcc Vcc Vcc V A , V B , V C , V D V A , V B , V C , V D V A , V B , V C , V D V A , V B , V C , V D V A , V B , V C , V D V A , V B , V C , V DV A , V B , V C , V D V A , V B , V C , V D V A , V B , V C , V D V A , V B , V C , V D V A , V B , V C , V D V A , V B , V C , V D V A , V B , V C , V DV A , V B , V C , V D V A , V B , V C , V DV A , V B , V C , V DI E , I F I E , I F I E , I F M P/R M P/R M P/R M P/R V 25Output noise level Response frequency Sensitivity temperature coefficient Supply currentDark output voltage Dark output differential voltage Sensitivity Sensitivity response Sensitivity response Mode switching characteristics Output current Dark currentTerminal capacitance Mode switching terminal voltage 1Mode switching terminal voltage 2Mode switching terminal current 1Mode switching terminal current 2SensitivityOutput noise level 1Output noise level 2Response frequency Sensitivity temperature coefficient 132.01.10.2824001.1−2522.5+70002.83.8+70005.21.4005.3−90−100−905.61.35 4.925−80−90−80−0.510.0700100.521.634ppm/°C 3.0−−−−0.37430(20)−−−−1.3−252.03.01.211.722.52.835.75.2mA nA pF mA mV V V V mV mV/µW mV/µW mV/µWppm/°C mV/µW µA/µW µA µA µA MHz dBm MHz dBm dBm (Ta =25°C, Vcc=V K =3.0V)*6*8*7"H "g a i n m o d e "L "g a i n m o d e C o m m o n t o b o t h m o d e sConditions*4 The incident light quantity range applies to individual photodiodes of A, B, C and D and is specified in the incident light quantity per single photodiode.*5 The incident light quantity range applies to individual photodiodes of E and F and is specified in the incident light quantity per single photodiode.ParameterSymbol MIN.TYP.MAX.Unit Supply voltageCathode terminal voltage "H"gain mode incident light quantity range 1"H"gain mode incident light quantity range 2"L"gain mode incident light quantity range 1"L"gain mode incident light quantity range 2V cc1 5.55.5V K φP1φP2φR1φR2V V 173.03.0635017150.52.72.711306367µWµW µW µW *4*5*4*5Fig.3 Detecting Pattern of PhotodiodeFig.4 Block DiagramFig.1 Response TimeFig.2 Response TimeY'XV CCV kABCD EGNDF P/R(“L” gain mode)Mode switching terminal voltage(“H” gain mode)Output V p (A, B, C, D)V “L” gain mode → “H” gain mode switching time(“H” gain mode)Mode switching terminal voltage(“L” gain mode)Output V p (A, B, C, D)V “H” gain mode → “L” gain mode switching timeMode M P/R terminal voltageSW state Gain resistance"H"gain mode L OFF R 1"L"gain modeHONR 1/R 2The switching circuit operates according to H and L voltage of the M P/R terminals.(Unit : µm)Fig.9 Dark Output Voltage vs. AmbientTemperature (H Gain Mode)Fig.8 Response Frequency vs. AmbientTemperature (L Gain Mode)Fig.10 Dark Output Voltage vs. AmbientTemperature (L Gain Mode)Fig.6 Supply Current vs. AmbientTemperature (L Gain Mode)Fig.7 Response Frequency vs. AmbientTemperature (H Gain Mode)Fig.5 Supply Current vs. AmbientTemperature (H Gain Mode)S u p p l y c u r r e n t I C C (m A )5.55.45.35.25.15.04.94.84.74.6Ambient temperature Ta (°C)4.5S u p p l y c u r r e n t I C C (m A )6.05.95.85.75.65.55.45.35.25.1Ambient temperature Ta (°C)5.0R e s p o n s e f r e q u e n c y f c (M H z )08Ambient temperature Ta (°C)7654321R e s p o n s e f r e q u e n c y f c (M H z )08Ambient temperature Ta (°C)7654321D a r k o u t p u t v o l t a g e V o d (V )1.8Ambient temperature Ta (°C)1.71.61.51.41.31.21.11.00.90.8D a r k o u t p u t v o l t a g e V o d (V )1.8Ambient temperature Ta (°C)1.71.61.51.41.31.21.11.00.90.8Fig.11 Sensitivity vs. Ambient Temperature(H Gain Mode)Fig.13 Sensitivity vs. Ambient Temperature(H/L Gain Mode)Fig.12 Sensitivity vs. Ambient Temperature(L Gain Mode)SensitivityRp(mV/µW)40Ambient temperature Ta (°C)3530252015105SensitivityRp(mV/µW)Ambient temperature Ta (°C)0.05.04.54.03.53.02.52.01.51.00.5SensitivityRp(µA/µW)Ambient temperature Ta (°C)0.330.430.420.410.400.390.380.370.360.350.34Application CircuitsNOTICEq The circuit application examples in this publication are provided to explain representative applications of SHARP devices and are not intended to guarantee any circuit design or license any intellectual property rights. SHARP takes no responsibility for any problems related to any intellectual property right of a third party resulting from the use of SHARP's devices.q Contact SHARP in order to obtain the latest device specification sheets before using any SHARP device.SHARP reserves the right to make changes in the specifications, characteristics, data, materials, structure, and other contents described herein at any time without notice in order to improve design or reliability. Manufacturing locations are also subject to change without notice.q Observe the following points when using any devices in this publication. SHARP takes no responsibility for damage caused by improper use of the devices which does not meet the conditions and absolute maximum ratings to be used specified in the relevant specification sheet nor meet the following conditions:(i) The devices in this publication are designed for use in general electronic equipment designs such as:--- Personal computers--- Office automation equipment--- Telecommunication equipment [terminal]--- Test and measurement equipment--- Industrial control--- Audio visual equipment--- Consumer electronics(ii)Measures such as fail-safe function and redundant design should be taken to ensure reliability and safety when SHARP devices are used for or in connection with equipment that requires higher reliability such as:--- Transportation control and safety equipment (i.e., aircraft, trains, automobiles, etc.)--- Traffic signals--- Gas leakage sensor breakers--- Alarm equipment--- Various safety devices, etc.(iii)SHARP devices shall not be used for or in connection with equipment that requires an extremely high level of reliability and safety such as:--- Space applications--- Telecommunication equipment [trunk lines]--- Nuclear power control equipment--- Medical and other life support equipment (e.g., scuba).q Contact a SHARP representative in advance when intending to use SHARP devices for any "specific"applications other than those recommended by SHARP or when it is unclear which category mentioned above controls the intended use.q If the SHARP devices listed in this publication fall within the scope of strategic products described in the Foreign Exchange and Foreign Trade Control Law of Japan, it is necessary to obtain approval to export such SHARP devices.q This publication is the proprietary product of SHARP and is copyrighted, with all rights reserved. Under the copyright laws, no part of this publication may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, in whole or in part, without the express written permission of SHARP. Express written permission is also required before any use of this publication may be made by a third party.q Contact and consult with a SHARP representative if there are any questions about the contents of this publication.。
00H —设置显⽰器模式0CH —写图形象素01H —设置光标形状0DH —读图形象素02H —设置光标位置0EH —在Teletype模式下显⽰字符03H —读取光标信息0FH —读取显⽰器模式04H —读取光笔位置10H —颜⾊05H —设置显⽰页11H —字体06H、07H —初始化或滚屏12H —显⽰器的配置08H —读光标处的字符及其属性13H —在Teletype模式下显⽰字符串09H —在光标处按指定属性显⽰字符1AH —读取/设置显⽰组合编码0AH —在当前光标处显⽰字符1BH —读取功能/状态信息0BH —设置调⾊板、背景⾊或边框1CH —保存/恢复显⽰器状态(1)、功能00H功能描述:设置显⽰器模式⼊⼝参数:AH=00HAL=显⽰器模式,见下表所⽰出⼝参数:⽆可⽤的显⽰模式如下所列:显⽰模式显⽰模式属性显⽰模式显⽰模式属性00H40×2516⾊⽂本01H40×2516⾊⽂本02H80×2516⾊⽂本03H80×2516⾊⽂本04H320×2004⾊05H320×2004⾊06H640×2002⾊07H80×252⾊⽂本08H160×20016⾊09H320×20016⾊0AH640×2004⾊0BH保留 0CH保留0DH320×20016⾊0EH640×20016⾊0FH640×3502(单⾊)10H640×3504⾊10H640×35016⾊11H640×4802⾊12H640×48016⾊13H640×480256⾊对于超级VGA显⽰卡,我们可⽤AX=4F02H和下列BX的值来设置其显⽰模式。
BX显⽰模式属性BX显⽰模式属性100H640×400256⾊101H640×480256⾊102H800×60016⾊103H800×600256⾊104H1024×76816⾊105H1024×768256⾊106H1280×102416⾊107H1280×1024256⾊108H80×60⽂本模式109H132×25⽂本模式10AH132×43⽂本模式10BH132×50⽂本模式10CH132×60⽂本模式(2)、功能01H功能描述:设置光标形状⼊⼝参数:AH=01HCH低四位=光标的起始⾏CL低四位=光标的终⽌⾏出⼝参数:⽆(3)、功能02H功能描述:⽤⽂本坐标下设置光标位置⼊⼝参数:AH=02HBH=显⽰页码DH=⾏(Y坐标)DL=列(X坐标)出⼝参数:⽆(4)、功能03H功能描述:在⽂本坐标下,读取光标各种信息⼊⼝参数:AH=03HBH=显⽰页码出⼝参数:CH=光标的起始⾏CL=光标的终⽌⾏DH=⾏(Y坐标)DL=列(X坐标)(5)、功能04H功能描述:获取当前状态和光笔位置⼊⼝参数:AH=04H出⼝参数:AH=00h——光笔未按下/未触发,01h——光笔已按下/已触发BX=象素列(图形X坐标)CH=象素⾏(图形Y坐标,显⽰模式:04H~06H)CX=象素⾏(图形Y坐标,显⽰模式:0DH~10H)DH=字符⾏(⽂本Y坐标)DL=字符列(⽂本X坐标)(6)、功能05H功能描述:设置显⽰页,即选择活动的显⽰页⼊⼝参数:AH=05HAL=显⽰页对于CGA、EGA、MCGA和VGA,其显⽰页如下表所列:模式页数显⽰器类型00H、01H0~7CGA、EGA、MCGA、VGA02H、03H0~3CGA02H、03H0~7EGA、MCGA、VGA07H0~7EGA、VGA0DH0~7EGA、VGA0EH0~3EGA、VGA0FH0~1EGA、VGA10H0~1EGA、VGA对于PCjr:AL=80H——读取CRT/CPU页寄存器81H——设置CPU页寄存器82H——设置CRT页寄存器83H——设置CRT/CPU页寄存器BH=CRT页(⼦功能号82H和83H)BL=CPU页(⼦功能号81H和83H)出⼝参数:对于前者,⽆出⼝参数,但对PCjr在⼦功能80H~83H调⽤下,有:BH=CRT页寄存器,BL=CPU页寄存器(7)、功能06H和07H功能描述:初始化屏幕或滚屏⼊⼝参数:AH=06H——向上滚屏,07H——向下滚屏 AL=滚动⾏数(0——清窗⼝)BH=空⽩区域的缺省属性(CH、CL)=窗⼝的左上⾓位置(Y坐标,X坐标)(DH、DL)=窗⼝的右下⾓位置(Y坐标,X坐标)出⼝参数:⽆(8)、功能08H功能描述:读光标处的字符及其属性⼊⼝参数:AH=08HBH=显⽰页码出⼝参数:AH=属性AL=字符(9)、功能09H功能描述:在当前光标处按指定属性显⽰字符⼊⼝参数:AH=09HAL=字符BH=显⽰页码BL=属性(⽂本模式)或颜⾊(图形模式)CX=重复输出字符的次数出⼝参数:⽆(10)、功能0AH功能描述:在当前光标处按原有属性显⽰字符⼊⼝参数:AH=0AHAL=字符BH=显⽰页码BL=颜⾊(图形模式,仅适⽤于PCjr)CX=重复输出字符的次数出⼝参数:⽆(11)、功能0BH功能描述:设置调⾊板、背景⾊或边框⼊⼝参数:AH=0BH设置颜⾊:BH=00H,BL=颜⾊选择调⾊板:BH=01H,BL=调⾊板(320×200、4种颜⾊的图形模式)出⼝参数:⽆(12)、功能0CH功能描述:写图形象素⼊⼝参数:AH=0CHAL=象素值BH=页码(CX、DX)=图形坐标列(X)、⾏(Y)出⼝参数:⽆(13)、功能0DH功能描述:读图形象素⼊⼝参数:AH=0DHBH=页码(CX、DX)=图形坐标列(X)、⾏(Y)出⼝参数:AL=象素值(14)、功能0EH功能描述:在Teletype模式下显⽰字符⼊⼝参数:AH=0EHAL=字符BH=页码BL=前景⾊(图形模式)出⼝参数:⽆(15)、功能0FH功能描述:读取显⽰器模式⼊⼝参数:AH=0FH出⼝参数:AH=屏幕字符的列数AL=显⽰模式(参见功能00H中的说明)BH=页码(16)、功能10H功能描述:颜⾊中断。
HTML页⾯原⽣VIDEO标签隐藏下载按钮功能
在写web项⽬的时候,遇到简介页⾯有⼀个单独的简介视频,只有这⼀个短短的视频所以没有使⽤任何video组件,所以运⽤原⽣video标签就想解决问题。
虽然简介视频是⾮付费的,但也不希望会有下载按钮或者可以视频另存为,所以找到⼀个可以看上去没有下载功能的⽅法,做⼀下笔记。
想要隐藏以上下载按钮,三个样式就可以了,不废话直接贴代码:
video::-internal-media-controls-download-button {
display:none;
}
video::-webkit-media-controls-enclosure {
overflow:hidden;
}
video::-webkit-media-controls-panel {
width: calc(100% + 50px);
}
说⽩了就是把下载按钮移动到视窗外⾯,但是这些CSS找了好久啊!!
这种⽅法并不能真正阻⽌视频的下载,“有⼼”的⽤户还是可以在缓存⽂件⾥找到加载过的视频⽂件的,所以就像标题写的⼀样,只是隐藏。
真正的阻⽌视频的下载还是需要通过服务器端对视频地址进⾏加密验证。
总结
以上所述是⼩编给⼤家介绍的HTML页⾯原⽣VIDEO标签隐藏下载按钮功能,希望对⼤家有所帮助,如果⼤家有任何疑问请给我留⾔,⼩编会及时回复⼤家的。
在此也⾮常感谢⼤家对⽹站的⽀持!。