Ask Your Question
1

C++ How to split video into 16 by 16 pixel for the whole frame?

asked 2014-07-01 00:42:28 -0600

VideoWM gravatar image

image description

Picture shows an example of a frame split into 16 by 16 and then 8 by 8. How do i split it in C++?

edit retag flag offensive close merge delete

Comments

Refer the answer here might be helpful.

Haris gravatar imageHaris ( 2014-07-01 00:52:41 -0600 )edit

@Haris Thank You. I have solve my problem with some help from the link you given.

VideoWM gravatar imageVideoWM ( 2014-07-10 03:26:20 -0600 )edit

Pleasure...:)

Haris gravatar imageHaris ( 2014-07-10 03:41:07 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
2

answered 2014-07-10 03:30:25 -0600

VideoWM gravatar image

updated 2014-07-10 03:33:55 -0600

This is the solution to do 16x16 and then 8x8.

for (int i = 0; i < height-16; i += 16) 
{ 

   for (int j = 0; j < width-16; j+= 16) 
   {
      Mat block = dctImage(Rect(j, i, 8, 8));

      vector<Mat> planes; 

      split(block, planes);
    }
}
edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-07-01 00:42:28 -0600

Seen: 1,506 times

Last updated: Jul 10 '14