Motion Model 6

[구현] Block-based Translational, Affine, Perspective Motion Estimation을 직접 구현해보기 (3)

소스 코드 using System; using System.IO; namespace MEModule_Perspective { class Program { static void Main(string[] args) { ... } private static byte[,,] full_search(byte[] luma, int frame, int width, int height) { byte[,,] result = new byte[frame - 1, width, height]; ulong[] allResi = new ulong[frame - 1]; int MB = 32; // 매크로블록 사이즈 int SubMB = 16; // Sub 블록 사이즈 int SU = 16; // 매크로블록에서 위아래 얼마나 더 가져올..

[구현] Block-based Translational, Affine, Perspective Motion Estimation을 직접 구현해보기 (2)

소스 코드 using System; using System.IO; namespace MEModule_Affine { class Program { static void Main(string[] args) { ... byte[] result_stream = make_stream(full_search(luma, frame, width, height), frame, width, height); ... } private static byte[,,] full_search(byte[] luma, int frame, int width, int height) { byte[,,] result = new byte[frame - 1, width, height]; ulong[] allResi = new ulong[frame -..

[구현] Block-based Translational, Affine, Perspective Motion Estimation을 직접 구현해보기 (1)

사전 정의 소스 코드 using System; using System.IO; namespace MEModule_ORG { class Program { static void Main(string[] args) { string path = "../../../sequence/BasketballDrive_1920x1080_50.yuv"; FileStream fs = new FileStream(path, FileMode.Open); BinaryReader br = new BinaryReader(fs); //Sequence size, number of frames int width = 1920; int height = 1080; int frame = 10; int N = width * height; byte[] l..