Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
現在、FFMPEG を使用してビデオ フレームを読み込もうとしています。形式は PIX_FMT_RGB24 です。フレームごとに、RGB 値はすべて frame->data[0] (フレームのタイプは AVFrame) にまとめられます。
各フレームの個々の R、G、および B 値を抽出するにはどうすればよいですか? これはビデオを処理するためのものです。ビットマップから RGB 値を抽出するのと同じように機能すると思います。ありがとう!
私の推測:
int p=x*3+y*frame->linesize[0]; r=frame->data[0][p]; g=frame->data[0][p+1]; b=frame->data[0][p+2];
r、g、bが逆になっている可能性があります。そして、スピードアップの余地はたくさんあります。