[void][system.reflection.Assembly]::LoadFrom("C:\Users\win7\Desktop\aipsdk\AipSdk.dll")
[void][system.reflection.Assembly]::LoadFrom("C:\Users\win7\Desktop\aipsdk\thirdparty\Newtonsoft.Json.dll")
$AppID="myAppID"
$APIKey="myAPIKey"
$SecretKey="mySecretKey"
$client=new-object Baidu.Aip.Ocr.Ocr($APIKey,$SecretKey)
$image=[System.IO.File]::ReadAllBytes("C:\Users\win7\Pictures\test.png")
$result=$client.GeneralBasic($image, $null)
$result.ToString()|ConvertFrom-Json|%{$_.words_result.words}
powershell 使用百度AI进行文本识别
最新推荐文章于 2025-02-17 11:27:33 发布