This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$outputDir = "./output_fast2" | |
if (!(Test-Path -Path $outputDir)) { | |
New-Item -ItemType Directory -Path $outputDir | |
} | |
Get-ChildItem -Path $sourceDir -Filter *.mp4 | ForEach-Object { | |
$outputFilename = Join-Path $outputDir ("$($_.BaseName)_fasted.mp4") | |
ffmpeg -i $_.FullName -vf "select='not(mod(n,300))',setpts=N/(FRAME_RATE*TB)" -r 60 -an -c:v libx264 -preset ultrafast -crf 20 -pix_fmt yuv420p $outputFilename |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pip install opencv-python | |
# pip install opencv-contrib-python | |
# pip install PIL | |
import cv2 | |
import os | |
def compare_images(image1, image2): | |
similarity_score = cv2.matchTemplate(image1, image2, cv2.TM_CCOEFF_NORMED)[0][0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<title>WA2</title> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<style> | |
html{ | |
background:#e6f9ff; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var | |
calc={}; | |
//通过两点计算斜率 | |
calc.slope=function(A,B){ | |
return (B.y-A.y)/(B.x-A.x); | |
}; | |
//通过斜率+单点计算截距 |