Введение
Обнаружение переходов между кадрами (или просто обнаружение кадров), также известное как обнаружение склеек, является областью исследований в области обработки видео. Его задача – автоматическое выявление переходов между кадрами в цифровом видео для временной сегментации видеоматериалов.
Использование
Обнаружение переходов между кадрами используется для разделения фильма на основные временные единицы, называемые кадрами; кадр — это серия взаимосвязанных последовательных изображений, снятых непрерывно одной камерой и представляющих собой единое действие в пространстве и времени. Эта операция очень полезна в программном обеспечении для пост-продакшна видео. Она также является фундаментальным этапом автоматизированной индексации и контентно-ориентированного поиска видео или создания кратких обзоров, обеспечивающих эффективный доступ к большим видеоархивам. Например, приложение может выбирать репрезентативное изображение из каждой сцены для создания визуального обзора всего фильма, а поисковая система, обрабатывая такие индексы, может выполнять поиск по запросам типа: "покажи мне все фильмы, где есть сцена со львом". Обнаружение склеек не может сделать ничего, что не смог бы сделать редактор вручную, однако оно выгодно, так как экономит время. Более того, в связи с увеличением использования цифрового видео и, как следствие, возрастающей важностью вышеупомянутых приложений индексации, автоматическое обнаружение склеек в настоящее время имеет большое значение.
Основные технические термины
Проще говоря, обнаружение склеек – это поиск позиций в видео, где одна сцена заменена другой с иным визуальным содержанием. С технической точки зрения используются следующие термины:
A digital video consists of frames that are presented to the viewer's eye in rapid succession to create the impression of movement. "Digital" in this context means both that a single frame consists of pixels and the data is present as binary data, such that it can be processed with a computer. Each frame within a digital video can be uniquely identified by its frame index, a serial number. A shot is a sequence of frames shot uninterruptedly by one camera. There are several film transitions usually used in film editing to juxtapose adjacent shots; In the context of shot transition detection they are usually group into two types:
Abrupt Transitions This is a sudden transition from one shot to another, i. e. one frame belongs to the first shot, the next frame belongs to the second shot. They are also known as hard cuts or simply cuts. Gradual Transitions In this kind of transitions the two shots are combined using chromatic, spatial or spatial chromatic effects which gradually replace one shot by another. These are also often known as soft transitions and can be of various types, e. g., wipes, dissolves, fades
"Detecting a cut" means that the position of a cut is gained; more precisely a hard cut is gained as "hard cut between frame i and frame i+1", a soft cut as "soft cut from frame i to frame j". A transition that is detected correctly is called a hit, a cut that is there but was not detected is called a missed hit and a position in that the software assumes a cut, but where actually no cut is present, is called a false hit. An introduction to film editing and an exhaustive list of shot transition techniques can be found at film editing.
Цифровое видео состоит из кадров, которые быстро сменяют друг друга перед глазами зрителя, создавая иллюзию движения. "Цифровой" в данном контексте означает, что отдельный кадр состоит из пикселей, а данные представлены в виде двоичного кода, пригодного для обработки компьютером. Каждый кадр в цифровом видео может быть однозначно идентифицирован по его индексу кадра – серийному номеру. План – это последовательность кадров, снятых непрерывно одной камерой. Существует несколько приемов монтажа, обычно используемых в кинорежиссуре для соединения соседних планов; в контексте обнаружения переходов между планами они обычно группируются в два типа:
A digital video consists of frames that are presented to the viewer's eye in rapid succession to create the impression of movement. "Digital" in this context means both that a single frame consists of pixels and the data is present as binary data, such that it can be processed with a computer. Each frame within a digital video can be uniquely identified by its frame index, a serial number. A shot is a sequence of frames shot uninterruptedly by one camera. There are several film transitions usually used in film editing to juxtapose adjacent shots; In the context of shot transition detection they are usually group into two types:
Abrupt Transitions This is a sudden transition from one shot to another, i. e. one frame belongs to the first shot, the next frame belongs to the second shot. They are also known as hard cuts or simply cuts. Gradual Transitions In this kind of transitions the two shots are combined using chromatic, spatial or spatial chromatic effects which gradually replace one shot by another. These are also often known as soft transitions and can be of various types, e. g., wipes, dissolves, fades
"Detecting a cut" means that the position of a cut is gained; more precisely a hard cut is gained as "hard cut between frame i and frame i+1", a soft cut as "soft cut from frame i to frame j". A transition that is detected correctly is called a hit, a cut that is there but was not detected is called a missed hit and a position in that the software assumes a cut, but where actually no cut is present, is called a false hit. An introduction to film editing and an exhaustive list of shot transition techniques can be found at film editing.
Резкие переходы. Это мгновенный переход от одного плана к другому, то есть один кадр принадлежит первому плану, а следующий – второму. Они также известны как жёсткие склейки или просто склейки.
A digital video consists of frames that are presented to the viewer's eye in rapid succession to create the impression of movement. "Digital" in this context means both that a single frame consists of pixels and the data is present as binary data, such that it can be processed with a computer. Each frame within a digital video can be uniquely identified by its frame index, a serial number. A shot is a sequence of frames shot uninterruptedly by one camera. There are several film transitions usually used in film editing to juxtapose adjacent shots; In the context of shot transition detection they are usually group into two types:
Abrupt Transitions This is a sudden transition from one shot to another, i. e. one frame belongs to the first shot, the next frame belongs to the second shot. They are also known as hard cuts or simply cuts. Gradual Transitions In this kind of transitions the two shots are combined using chromatic, spatial or spatial chromatic effects which gradually replace one shot by another. These are also often known as soft transitions and can be of various types, e. g., wipes, dissolves, fades
"Detecting a cut" means that the position of a cut is gained; more precisely a hard cut is gained as "hard cut between frame i and frame i+1", a soft cut as "soft cut from frame i to frame j". A transition that is detected correctly is called a hit, a cut that is there but was not detected is called a missed hit and a position in that the software assumes a cut, but where actually no cut is present, is called a false hit. An introduction to film editing and an exhaustive list of shot transition techniques can be found at film editing.
Плавные переходы. В этом типе переходов два плана объединяются с использованием хроматических, пространственных или пространственно-хроматических эффектов, которые постепенно заменяют один план другим. Они также часто называются мягкими переходами и могут быть различных видов, например, вытеснение, растворение, затемнение.
A digital video consists of frames that are presented to the viewer's eye in rapid succession to create the impression of movement. "Digital" in this context means both that a single frame consists of pixels and the data is present as binary data, such that it can be processed with a computer. Each frame within a digital video can be uniquely identified by its frame index, a serial number. A shot is a sequence of frames shot uninterruptedly by one camera. There are several film transitions usually used in film editing to juxtapose adjacent shots; In the context of shot transition detection they are usually group into two types:
Abrupt Transitions This is a sudden transition from one shot to another, i. e. one frame belongs to the first shot, the next frame belongs to the second shot. They are also known as hard cuts or simply cuts. Gradual Transitions In this kind of transitions the two shots are combined using chromatic, spatial or spatial chromatic effects which gradually replace one shot by another. These are also often known as soft transitions and can be of various types, e. g., wipes, dissolves, fades
"Detecting a cut" means that the position of a cut is gained; more precisely a hard cut is gained as "hard cut between frame i and frame i+1", a soft cut as "soft cut from frame i to frame j". A transition that is detected correctly is called a hit, a cut that is there but was not detected is called a missed hit and a position in that the software assumes a cut, but where actually no cut is present, is called a false hit. An introduction to film editing and an exhaustive list of shot transition techniques can be found at film editing.
"Обнаружение склейки" означает определение позиции склейки; точнее, жёсткая склейка определяется как "жёсткая склейка между кадром i и кадром i+1", а мягкая склейка – как "мягкая склейка от кадра i к кадру j". Правильно обнаруженный переход называется обнаружением, склейка, которая присутствует, но не была обнаружена, называется пропуском, а позиция, где программа ошибочно предполагает наличие склейки, а на самом деле её нет, называется ложным обнаружением. Введение в теорию монтажа и исчерпывающий список приемов переходов между планами можно найти в разделе, посвященном монтажу фильмов.
A digital video consists of frames that are presented to the viewer's eye in rapid succession to create the impression of movement. "Digital" in this context means both that a single frame consists of pixels and the data is present as binary data, such that it can be processed with a computer. Each frame within a digital video can be uniquely identified by its frame index, a serial number. A shot is a sequence of frames shot uninterruptedly by one camera. There are several film transitions usually used in film editing to juxtapose adjacent shots; In the context of shot transition detection they are usually group into two types:
Abrupt Transitions This is a sudden transition from one shot to another, i. e. one frame belongs to the first shot, the next frame belongs to the second shot. They are also known as hard cuts or simply cuts. Gradual Transitions In this kind of transitions the two shots are combined using chromatic, spatial or spatial chromatic effects which gradually replace one shot by another. These are also often known as soft transitions and can be of various types, e. g., wipes, dissolves, fades
"Detecting a cut" means that the position of a cut is gained; more precisely a hard cut is gained as "hard cut between frame i and frame i+1", a soft cut as "soft cut from frame i to frame j". A transition that is detected correctly is called a hit, a cut that is there but was not detected is called a missed hit and a position in that the software assumes a cut, but where actually no cut is present, is called a false hit. An introduction to film editing and an exhaustive list of shot transition techniques can be found at film editing.
Размер проблемы
Хотя обнаружение склеек кажется простой задачей для человека, это нетривиальная задача для компьютеров. Обнаружение склеек было бы тривиальной проблемой, если бы каждый кадр видео содержал дополнительную информацию о времени и камере съемки. Вероятно, ни один алгоритм обнаружения склеек никогда не сможет с уверенностью определить все склейки, если ему не будет предоставлен мощный искусственный интеллект. Большинство алгоритмов хорошо справляются с резкими склейками, но многие не распознают плавные. Резкие склейки обычно сопровождаются внезапными и значительными изменениями визуального контента, в то время как плавные склейки характеризуются медленными и постепенными изменениями. Человек может компенсировать недостаток визуального разнообразия, понимая смысл происходящего. В то время как компьютер может воспринять черную полосу, закрывающую кадр, как "просто очередной объект, медленно движущийся в сцене", человек понимает, что сцена заканчивается и заменяется черным экраном.
Стоимость
Все вышеуказанные алгоритмы завершаются за время O(n) — то есть выполняются за линейное время — где n — количество кадров во входном видео. Алгоритмы различаются постоянным множителем, который в основном определяется разрешением изображения видео.
Сравнительные показатели
+ Сравнение бенчмарков Бенчмарк Видео Часы Кадры Переходы сцен Участники Годы TRECVid 12 42 4.8 7.5 545 068 744 604 2090 4806 57 2001–2007 МСУ SBD 31 21.45 1 900 000+ 10 883 7 2020–2021
TRECVid SBD Benchmark 2001-2007 гг.
Автоматическое обнаружение переходов между кадрами было одним из направлений деятельности в рамках ежегодного сравнительного анализа TRECVid с 2001 по 2007 год. Было представлено 57 алгоритмов от разных исследовательских групп. Для каждого алгоритма были выполнены вычисления F-меры на наборе данных, который ежегодно обновлялся. + Лучшие исследовательские группы Группа F-мера Скорость обработки (по сравнению с реальным временем) Открытый исходный код Используемые метрики и технологии Университет Цинхуа 0,897 ×0,23 Нет Среднее значение интенсивности пикселей Стандартное отклонение интенсивности пикселей Цветовая гистограмма Различие по пикселям Вектор движения NICTA 0,892 ×2,30 Нет Машинное обучение IBM Research 0,876 ×0,30 Нет Цветовая гистограмма Гистограмма направлений локальных границ Сравнение миниатюр кадров Яркость кадра.
Сравнительный показатель SBD MSU 2020-2021
В исследовании сравнили 6 методов на более чем 120 видео из наборов данных RAI и MSU CC, содержащих различные типы переходов между сценами, некоторые из которых были добавлены вручную. Авторы утверждают, что ключевая особенность данного эталонного набора данных – сложность переходов между кадрами. Для подтверждения этого они вычисляют метрику SI/TI для кадров и сравнивают её с другими общедоступными наборами данных. + Лучшие алгоритмы
Алгоритм | F-мера | Скорость обработки (FPS) | Открытый исходный код | Используемые метрики и технологии
---|---|---|---
Саид Дадках | 0.797 | 86 | Да | Цветовая гистограмма, адаптивный порог
Макс Райманн | 0.787 | 76 | Да | SVM для резких переходов, нейронные сети для плавных переходов, цветовая гистограмма
VQMT | 0.777 | 308 | Нет | Гистограммы границ, компенсация движения, цветовые гистограммы
PySceneDetect | 0.776 | 321 | Да | Интенсивность кадра
FFmpeg | 0.772 | 165 | Да | Цветовая гистограмма