Convert 3D movies with splited Frames to Anaglyph 3D movies to watch with 3d Red (Blue/Cyan/Green) Glasses
If a 3D video is available the frames can be extracted from the Video by applying the frame Position. 3D video Files can be found here: YTS
BufferedImage frame = FleurVideo.extract(new File("3dVideo.mp4"), 6000);
List<BufferedImage> splited = Fleur3dUtil.split(frame);
BufferedImage frameCombined = FleurFilter.additive(
FleurFilter.color(splited.get(0), ColorMask.RED),
FleurFilter.color(splited.get(1), ColorMask.CYAN));
ImageHelper.saveImage(frameCombined, "frame_combined.png");
FleurVideo.extract(new File("3dVideo.mp4"), 6000);
left | right |
---|---|
List<BufferedImage> splited = Fleur3dUtil.split(frame);
BufferedImage combined = FleurFilter.alphaCombine(frame1, frame2);
left | right |
---|---|
RGB(x, 0, 0) / 0xFFFF0000 | RGB(0, x, x) / 0xFF00FFFF |
BufferedImage redFilterImg = FleurFilter.color(splited.get(0), FilterColor.RED);
BufferedImage greenBlueFilterImg = FleurFilter.color(splited.get(1), FilterColor.CYAN);
Additive Color filtering => For every Pixel on final Image RGB(LeftImage.red, RightImage.green, RightImage.blue)
BufferedImage additiveCombinedFrame = FleurFilter.additive(
FleurFilter.color(splited.get(0), FilterColor.RED),
FleurFilter.color(splited.get(1), FilterColor.CYAN)
);
// Extract images from Video (specific from frames 6000 - 6200)
List<BufferedImage> images
= FleurVideo.extract(new File("3dVideo.mp4"), 6000, 6010);
List<BufferedImage> videoImages = new ArrayList<>();
for (BufferedImage image : images) {
List<BufferedImage> splits = Fleur3dUtil.split(image);
videoImages.add(FleurFilter.additive(
FleurFilter.color(splits.get(0), ColorMask.RED),
FleurFilter.color(splits.get(1), ColorMask.CYAN)
));
}
FleurVideo.create(videoImages, "3dVideoOut.mp4");
List<BufferedImage> images = FleurVideo.extract(new File("3dVideo.mp4"), 6000, 6100);
List<BufferedImage> leftArray = new ArrayList<>();
List<BufferedImage> rightArray = new ArrayList<>();
for (BufferedImage image : images) {
List<BufferedImage> splits = Fleur3dUtil.split(image);
leftArray.add(splits.get(0));
rightArray.add(splits.get(1));
}
FleurVideo.create(leftArray, "left.mp4");
FleurVideo.create(rightArray, "right.mp4");
To use: play both videos at the same frames but on two diffrent beamers.... I dont have two beamers... well. I havent tested this acctually
Or use active shutter 3d glasses requires 60hz monitor and switching on each frame to the other video...
Active_shutter_3D_system