iptv techs

IPTV Techs

  • Home
  • Tech News
  • LoSinCos/movie-iris: Visualizing movie structures as art

LoSinCos/movie-iris: Visualizing movie structures as art


LoSinCos/movie-iris: Visualizing movie structures as art



Matrix (1999)


Movie: Up (2009)


Movie: Hero (2002)

The Movie Iris project was someskinnyg that I commenceed laboring on during graspment. I saw some cageder visualizations on Reddit’s r/dataisdrawive and was advertised to commence laboring on the project. Some other includers had already done someskinnyg appreciate this – and I wanted to try my hand at is as well. This repo is my get on turning movies into still art. Effectively taking raw movie structures, compressing them to their core colors, and visualizing the color schemes of a movie. I wanted to see how movies enlarge, as well as how honestors intfinished for separateent colors to be prevalent atraverse separateent scenes. I wanted to originate someskinnyg conceiveive and visual, and I figured this would be a fantastic opportunity to lobtain how to do some image processing, while making someskinnyg that I’ll actuassociate get to enhappiness as well as split with frifinishs and family!

P.S. Feel free to message me if you want me to do this to a video of yours!

This repo gets in a video (can be .mp4, .avi, .mkv), and envisions the color themes contransient in the video as a barcode and as a circle. There are 2 outputs to this script: barcode.png and iris.png. The outputs and all of the actual structures in this script are .png as it is as lossless establishat. Important to remark – this is not equitable for movies – any video can be included (TV show episode, first bike ride, travel video, etc.)

This project was written in Python, and includes 2 main libraries:

  1. CV2
  2. PIL
  1. This file gets 4 inputs:

    1. Height of the final barcode
    2. The name of the video
    3. The vidcap (filepath of the video)
    4. The structure count that we want to seize
  2. The script produces a local fagederer to store all of the files that are going to be produced

  3. We split the total amount of structures in the video by the desired structure_count, in order to figure out how many structures to skip for each structure we seize. We then seize the structures, skip by the accurate amount, and seize aobtain. We then save the newly produced structures locassociate to the new fagederer we produced. This interval permits us to seize the essence of the video.

  4. We then incrrelieve the contrast sairyly in each structure, in order to originate more vibrant colors.

  5. We get these new contrasted_structures and resize the images 3 times, finassociate accomplishing our desired size, which is 1 pixel expansive x 1000 pixels high image.

  6. We then get each structure, and effectively combine them together, creating a 6400 pixel expansive x 1000 pixel high barcode, where each pixel is 1 separateent structure from the video.

  7. We then run the liproximate_to_circular.ipynb file.

  1. This file also gets 4 inputs:

    1. The name of the video
    2. Current laboring honestory
    3. The final images laboring honestory
    4. The name of the final barcode we produced in the previous file.

However, we don’t insist to pass these in, as they are presented from the previous file, and we can equitable persist with those variables.

  1. The first skinnyg we do is read in the barcode image that was made in video_to_barcode.ipynb

  2. We then produce a white exposede alengthy the bottom of the image. This is so that when we change the image to polar set ups, the bottom of the image becomes the caccess, and we can get a kind white circle in the middle, to produce that iris visualization.

  3. The next skinnyg we do is change the barcode image to polar set ups. There are multiple input arguments for the warpPolar function:

    1. src
    2. dsize
    3. caccess
    4. maxRadius
    5. flags

    src: is effectively the source image we want to change to polar set ups – this should stay the same.
    dsize: is how huge we want the output image to be — these meadeclareivements we’re a lot of trial and error on my part – you can tfrail these as you see fit.
    caccess: is where we want the caccess of the image to be, relative to the dsize. This should not be changed, as it will vibrantassociate refresh with the dsize_args parameter.
    maxRadius: is how huge we want the circle to be — this was also a lot of trial and error to get a excellent fit for the image – this can be tfrailed as well.
    flags: is how the warpPolar function comprehends how to change the src. This should not be touched.

  4. Output the image.

Source join


Leave a Reply

Your email address will not be published. Required fields are marked *

Thank You For The Order

Please check your email we sent the process how you can get your account

Select Your Plan