minor updates
[goodguy/cin-manual-latex.git] / parts / Plugins.tex
index 74023261a74288f254bcc8852de50470bf8e8448..e4fbce96c3cc2b11342421a318f02b877f150a7c 100644 (file)
@@ -104,6 +104,15 @@ Two other effect types available in the Attach Effect dialog are \textit{Shared
     \item The insertion point or selected region must start inside the other effects.
 \end{itemize}
 
+Before going into further detail about how to use \textit{Shared effects}, an easier
+alternative method of application which is especially useful for Audio tracks is
+available.  In this method, all you have to do is use the \textit{Audio} pulldown and
+choose \textit{Attach effect}, highlight the effect you would like and make sure the
+default of \textit{Attach single standalone and share others} is checked on.  It will
+automatically be a "Shared Effect" on all audio tracks (be sure to disarm any audio
+tracks that you do not want to have the effect shared on).  This method also works for
+Video tracks using the \textit{Video} pulldown choice of \textit{Attach effect}.
+
 In the case of a shared track, there must be another track on the timeline of the same type as the track you are applying an effect to. If you right clicked on a video track to attach an effect, there will not be anything in the shared tracks column if no other video track exists. The same applies equally to audio tracks in that another audio track must exist. Shared tracks are often used as layers for titles, curves and keyframes.
 
 If shared effects or shared tracks are available, they appear in the shared effects and shared tracks columns when you used the \textit{Attach effect} option (RMB on a track). When the green colored checkmark is clicked OK, anything highlighted in the column is attached under the current track.
@@ -721,7 +730,8 @@ export LADSPA_PATH=/usr/lib/ladspa
 
 LV2 is an open standard for audio plugins using a simple interface with extensions which add functionality to support audio software. These plugins were written by external developers and provide additional audio effects to \CGG{} audio without having to change \CGG{} every time. Because the LV2 plugins are separate from \CGG{} Infinity, if one fails or does not perform as expected, \CGG{} should stay running and you will have to contact the programmers responsible for that plugin for a fix.
 
-Typically, a user OS has specialized package groups installed. It is difficult to create one build of \CGG{} to accommodate all potential LV2 plugins. Specifically for the \textit{Calf-Studio LV2 plugins}, you should install the \textit{Calf Plugins} package. The user’s computer must have \textit{gtk-2-runtime} installed, which seems to be automatically done already for most distros. For users doing their own builds, you can build \CGG{} without LV2 support by including \texttt{-{}-without-lv2} in the configure step. The default build is \texttt{-{}-with-lv2=yes} and requires that \textit{GTK-2-devel} must be installed or the build will fail and notify you.
+Typically, a user OS has specialized package groups installed. It is difficult to create one build of \CGG{} to accommodate all potential LV2 plugins. Specifically for the \textit{Calf-Studio LV2 plugins}, you should install the \textit{Calf Plugins} package. The user’s computer must have \textit{gtk-2-runtime} installed, which seems to be automatically done already for most distros. For users doing their own builds, you can build \CGG{} without LV2 support by including \texttt{-{}-without-lv2} in the configure step. The default build is \texttt{-{}-with-lv2=yes} and requires that \textit{GTK-2-devel} must be installed or the build will fail and notify you. In addition for some newer distros, you will need to install
+\textit{lv2-calf-plugins-gui}; for example Fedora version 32.
 
 LV2 plugins have their own category in the \textit{Audio Plugins Visibility} as lv2. There is a simple text interface which is available via the usual \textit{Show controls} button when the plugin is attached to the audio track. This window has a Reset button to get back to the default settings. To change a value of one of the parameters, highlight that parameter and type in the new value in the topmost text box and then hit Apply to take effect -- the reason for requiring hitting apply is so that the audio is not moving all over the place while you are still typing a value. More easily, you can just move the \textit{pot dial} or the \textit{slider} bar which take effect automatically.
 
@@ -1956,10 +1966,33 @@ Since it is a very slow effect, there is a method to applying the motion tracker
 
 Enable which of translation motion or rotation motion vectors you want to track. By watching the compositor window and adjusting the \textit{Block x,y} settings, center the block on the part of the image you want to track. It is advisable to choose elements that have evident edges in the $x$ and $y$ directions because the calculations are made on these coordinates. Then set \textit{search radius}, \textit{block size} and \textit{block coordinates} for translation and rotation.
 
-Once this is configured, set the calculation to \textit{Save coords} and do test runs through the sequence to see if the motion tracker works and to save the motion vectors. Next, disable playback for the track, disable \textit{Draw vectors}, set the motion action to perform on the target layer and change the calculation to \textit{Load coords}. Finally enable playback for the track.
+Once this is configured, set the calculation to \textit{Save coords} and do test runs through the sequence to see if the motion tracker works and to save the motion vectors. Next, disable \textit{Draw vectors}, set the motion action to perform on the target layer and change the calculation to \textit{Load coords}.
 
 When using a single starting frame to calculate the motion of a sequence (Keep Shape), the starting frame should be a single frame with the least motion to any of the other frames. This is rarely frame $0$. Usually it is a frame near the middle of the sequence. This way the search radius need only reach halfway to the full extent of the motion in the sequence.
 
+Summarizing:
+
+\begin{enumerate}
+       \item In the Master Layer create and save the tracking file:
+       \begin{itemize}
+               \item \textit{Draw vectors}: checked
+               \item \textit{Action}: Do Nothing
+               \item \textit{Calculation}: Save coords to Tracking File
+       \end{itemize}
+       \item Clone the track, which becomes the Target Layer. The Motion plugin will also be copied.
+               \begin{itemize}
+                       \item \textit{Draw vectors}: unchecked
+                       \item \textit{Action}: Do Nothing
+                       \item \textit{Calculation}: Load coords from Tracking File
+               \end{itemize}
+       \item Add a third track to place the video of the object to be superimposed. Add the shared effects of the motion plugin taken from the Master Layer.
+               \begin{itemize}
+                       \item \textit{Draw vectors}: unchecked
+                       \item \textit{Action}: Track Subpixel
+                       \item \textit{Calculation}: Load coords from Tracking File
+               \end{itemize}
+\end{enumerate}
+
 If the motion tracker is used on a render farm, Save coords and previous frame mode will not work. The results of the save coords operation are saved to the hard drives on the render nodes, not the master node. Future rendering operations on these nodes will process different frames and read the wrong coordinates from the node filesystems. The fact that render nodes only visualize a portion of the timeline also prevents previous frame from working since it depends on calculating an absolute motion vector starting on frame $0$.
 
 \subsubsection*{2 pass motion tracking}
@@ -2133,6 +2166,15 @@ Figure~\ref{fig:perspective01} show the results of the 4 different smoothing opt
     \label{fig:perspective01}
 \end{figure}
 
+Just a side note about the possibility of ending up with a divide by 0 case when manipulating
+the endpoints.  Sometimes this results in a single frame anomaly but you can workaround this
+by setting the X value for the middle keyframe of a series to just a little more than 0,
+such as .01 so that dividing by 0 is avoided. The actual cause of the problem is that the
+interpolated X1..X4 auto coordinates used by perspective eventually have x1==x2, x3==x4, so
+that all points x are scaled by zero. Another solution is to tweak the frame count to an even
+number, so that the center is not over the point where x1==x2, x3==x4, or perturb the midpoint
+position a little so that the answers are not exactly zero.
+
 \subsection{Polar}%
 \label{sub:polar}
 
@@ -2857,35 +2899,95 @@ This effect applies a traditional \textit{darkroom} technique, the so called \te
 \subsection{Videoscope}%
 \label{sub:videoscope}
 
-Videoscope summarizes intensity and color on a calibrated display. The Videoscope can be used in conjunction with other \CGG{} plugins such as \textit{Color 3 Way}, \textit{YUV}, \textit{Brightness}, \textit{Color Balance} or \textit{Histogram} to accurately correct video for contrast, clarity, conformance (to normalize various videos shot under different light settings), or for cinematic purposes. The human eye is not specialized to match precise level of light and color, but Videoscope is. Videoscope contains three displays: the waveform scope and the vectorscope, plus the histograms (figure~\ref{fig:videoscope01}).
+Videoscope summarizes intensity and color on a calibrated display. The Videoscope can be used in conjunction with other \CGG{} plugins such as \textit{Color 3 Way}, \textit{YUV}, \textit{Brightness}, \textit{Color Balance} or \textit{Histogram} to accurately correct video for contrast, clarity, conformance (to normalize various videos shot under different light settings), or for cinematic purposes. The human eye is not specialized to match precise level of light and color, but Videoscope is. Videoscope contains three displays: the waveform scope and the vectorscope, plus the histograms (figure~\ref{fig:videoscope01}). Instead of applying the plugin to the tracks/edits we want to examine, we can use the Videoscope buttons in the Composer and Viewer windows. \includegraphics[height=\baselineskip]{scope.png} In this way the monitors act on the frame indicated by the insertion point, without taking into account the stack of tracks or on which edits to apply the plugin.
+
+The Videoscope menu window has many options.
+
+\paragraph*{Scopes:} we can choose between two histograms:
+
+\begin{itemize}[noitemsep]
+       \item \textit{Histogram}
+       \item \textit{Histogram RGB}
+\end{itemize}
+three waveforms: 
+\begin{itemize}[noitemsep]
+       \item \textit{Waveform}
+       \item \textit{Waveform RGB} (aka RGB Parade)
+       \item \textit{Waveform Ply} (which superimposes the three Waveform RGB graphs in a single view.)
+\end{itemize}
+and two vectorscopes: 
+\begin{itemize}[noitemsep]
+       \item \textit{Vectorscope}
+       \item \textit{VectorWheel}
+\end{itemize}
 
 \begin{figure}[hbtp]
-    \centering
-    \includegraphics[width=0.8\linewidth]{videoscope01.png}
-    \caption{GUI of the Videoscope. You see Histogram, RGB Parade and Vectorscope}
-    \label{fig:videoscope01}
+       \centering
+       \includegraphics[width=1.0\linewidth]{videoscope01.png}
+       \caption{GUI of the Videoscope. You see Histogram, RGB Parade and Vectorscope}
+       \label{fig:videoscope01}
 \end{figure}
 
-\subsubsection*{Waveform/RGB Parade}%
-\label{ssub:waveform_rgb_parade}
+\paragraph*{Settings:} It is divided into two sections. The upper section contains two items:
+
+\begin{description}
+       \item[Smooth:] serves to make the graph more homogeneous, improving its visualization.
+       \item[Refresh on Stop ON:] [checked -- only for Transport buttons] scopes are updated when you stop playback at a given location. Instead, they are locked at the start position while you playback. This saves system resources and makes playback smoother. By dragging the cursor the scopes are updated in realtime.
+       \item[Refresh on Stop OFF:] [unchecked -- for Transport buttons and dragging cursor] the display of the scopes is synchronized with the playback. Every variation of the graphs is in realtime. There may be some decrease in fps during playback.
+       \item[Refresh on Release:] This works for the Viewer and Compositor windows. Scopes are not updated during playback. The update occurs only when you stop playback, that is at the final position (either by dragging the cursor or using the Transport buttons). When in the timeline, if you drag on the TimeBar or reposition in the TimeBar in either Drag and Drop or Cut and Paste mode, the release of the button also will update the Scopes.  This saves system resources and makes playback smoother.  Because there is no update when playing in the main window, you can still easily get a videoscope update simply by moving the mouse to the Compositor and a single click there will update the scopes without changing the frame (as long as Click to Play is not enabled).
+\end{description}
+
+ The lower section, called \textit{VectorWheel Grids}, it is only active when VectorWheel is set up in Scopes pull-down and contains four entries (figure~\ref{fig:videoscope06}):
+
+ \begin{figure}[hbtp]
+       \centering
+       \includegraphics[width=1.0\linewidth]{videoscope06.png}
+       \caption{Pull-down Settings}
+       \label{fig:videoscope06}
+ \end{figure}
+ \begin{description}
+       \item[None:] It only shows the colour wheel, without any superimposed graticula.
+       \item[All:] Shows the most complete grid that allows precise and useful measurements. It also shows the skintones area.
+       \item[Hue:] Show a more minimal grid.  It also shows the I-Line.
+       \item[IQ:] Show shows only I-Line and Q-Line.
+ \end{description}
+
+
+You can create custom grids. These are raster .png images of adequate resolution and must be put in:
+
+\begin{lstlisting}[style=sh]
+[your cinelerra path]/bin/plugins/scopes/custom_grid.png
+\end{lstlisting}
+
+More information in the later section on Vectorscope.
+
+\paragraph*{Sliders:} allow for varying the \textit{solidity} of the dots shown in Waveforms and Vectorscope. You can get to the subpixel level for precision. They are accompanied by Reset buttons that restore them to default values.
+
+
+
+\subsubsection*{Waveform/RGB Parade/Waveform Ply}%
+\label{ssub:waveform_rgb_parade_ply}
 
-The \textit{Waveform Scope} displays image intensity (luminance) versus image $X$ position. The \textit{RGB Parade Scope} displays image RGB intensity versus image $X$ position (one graph per channel). The Waveform Scope appears on the left side or in the middle of the Videoscope window. The display is calibrated vertically from $0\%$ intensity (black) at the bottom up to $100\%$ intensity (white) at the top. Each column of pixels in the image corresponds to one column of pixels in the Waveform Scope (figure~\ref{fig:videoscope02}). Note that the height of the values of a waveform/RGB Parade corresponds exactly to the values on the $x\, axis$ in the \textit{histogram}. A vertical/horizontal correspondence is therefore obtained.
+The \textit{Waveform Scope} displays image intensity (luminance) versus image $X$ position. The \textit{Waveform RGB} displays image RGB intensity versus image $X$ position (one graph per channel). The \textit{Waveform Ply} shows the three channels in a single graph. The Waveform Scope appears on the left side or in the middle of the Videoscope window. The display is calibrated vertically from $0\%$ intensity (black) at the bottom up to $100\%$ intensity (white) at the top. Each column of pixels in the image corresponds to one column of pixels in the Waveform Scope (figure~\ref{fig:videoscope02}). Note that the height of the values of a waveform/waveform RGB corresponds exactly to the values on the $x\, axis$ in the \textit{histogram}. A vertical/horizontal correspondence is therefore obtained.
 
 \begin{figure}[hbtp]
     \centering
-    \includegraphics[width=0.9\linewidth]{videoscope02.png}
-    \caption{Colortest 75\% with RGB Parade (left) and Waveform (right)}
+    \includegraphics[width=1.0\linewidth]{videoscope02.png}
+    \caption{Colortest 75\% with Waveform RGB (left) and Waveform (right)}
     \label{fig:videoscope02}
 \end{figure}
 
-On the left is shown RGB Parade: instead of the color shadows as in figure~\ref{fig:videoscope01}, we have lines representing the color bar test at $75\%$. They are pure colors, so all pixels have the same value. In fact, they are all at the level of $75\%$ except for the $100\%$ white band and the $0\%$ black band. In the waveform on the right, we have the same behavior with regard to luminance: the white band is $100\%$; the black band is $0\%$ and all the others $75\%$.
+On the left is shown waveform RGB: instead of the color shadows as in figure~\ref{fig:videoscope01}, we have lines representing the color bar test at $75\%$. They are pure colors, so all pixels have the same value. In fact, they are all at the level of $75\%$ except for the $100\%$ white band and the $0\%$ black band. In the waveform on the right, we have the same behavior with regard to luminance: the white band is $100\%$; the black band is $0\%$ and all the others $75\%$.
 
-The Waveform scope helps correct image light levels for contrast range or for conforming light levels on various scenes originally shot on different light settings (figure~\ref{fig:videoscope03}).
+If we left-click on the graph with the mouse, we will see a crosshair that we can place exactly where we want to measure. We can read the precise values of X and Luminance (Value) in the pop-up box that appears at the bottom right (figure~\ref{fig:videoscope03}).
+
+The Waveform scope helps correct image light levels for contrast range or for conforming light levels on various scenes originally shot on different light settings. The same can be done with Waveform RGB or the convenient overlapping representation (Waveform Ply).
 
 \begin{figure}[hbtp]
     \centering
-    \includegraphics[width=0.7\linewidth]{videoscope03.png}
-    \caption{Example of waveform}
+    \includegraphics[width=1.0\linewidth]{videoscope03.png}
+    \caption{Examples of waveform (with crosshair and the coordinates' box), waveform RGB and waveform Ply}
     \label{fig:videoscope03}
 \end{figure}
 
@@ -2894,13 +2996,13 @@ The Waveform scope helps correct image light levels for contrast range or for co
 
 \begin{enumerate}
     \item Add the \textit{Brightness/Contrast}, \textit{Histogram}, \textit{Color 3 Way} or another video adjustment effect on your track/edit.
-    \item Add the Videoscope effect on the track below. Make sure that it is placed below so it can see the adjustment effect's results. If it is not, right-click and move it down.
+    \item Add the Videoscope effect on the track. Make sure that it is placed below in the stack of effects, so it can see the adjustment effect's results. If it is not, right-click and move it down. Or do not use the plugin but activate the Videoscope button in the Compositor window.
     \item Show both the effect and Videoscope.
     \item Adjust the contrast while observing the waveform to match the desired light level.
-    \item Precise adjustments can be made by measuring the values on the waveform with the crosshair (by click with LMB, and reading numeric values on top left of the window) and reporting these numbers in the effects window (\textit{Histogram Bézier}, for example).
+    \item Precise adjustments can be made by measuring the values on the waveform with the crosshair (by clicking LMB, and reading numeric values on the pop-up box) and reporting these numbers in the effects window (\textit{Histogram Bézier}, for example).
 \end{enumerate}
 
-For instance, if you are looking for maximum contrast range, adjust the \textit{Brightness/Contrast} levels to align the darkest point on the scope with the $0\%$ level and the brightest portion with $100\%$. Anything above $100\%$ is over saturated. Limits which may be highlighted with checkbox controls.
+For example, if you are looking for maximum contrast range, adjust the \textit{Brightness/Contrast} levels to align the darkest point on the scope with the $0\%$ level and the brightest portion with $100\%$. Anything above $100\%$ is over saturated. Limits may be highlighted with checkbox controls.
 
 \subsubsection*{HDTV or sRGB (ITU-R BT.709)}%
 \label{ssub:hdtv_srgb_bt709}
@@ -2920,14 +3022,33 @@ If you are producing a video for NTSC television broadcast, keep the intensity b
 \subsubsection*{Vectorscope}%
 \label{ssub:Vectorscope}
 
-The Vectorscope displays \textit{hue} (angle on the color wheel) and \textit{saturation} (radius). Each pixel in the source image is drawn as a point on the color wheel. The distance from the center is the color saturation. Gray values are close to the center, and high saturation values are near the perimeter ($100\%$). In the center there is pure white ($0\%$). By clicking with the mouse on the color wheel appear radius and circle whose values of hue and saturation are shown at the top left of the window, similar to the values of $X$ and luminance of the Waveform and RGB Parade (figure~\ref{fig:videoscope04}).
+The Vectorscope displays \textit{hue} (angle on the color wheel) and \textit{saturation} (radius). Each pixel in the source image is drawn as a point on the color wheel. The distance from the center is the color saturation. Gray values are close to the center, and high saturation values are near the perimeter ($100\%$). In the center there is pure white ($0\%$). By clicking with the mouse on the color wheel a radius and circle will appear whose values of hue and saturation are shown in the  pop-up box at the bottom right of the window, similar to the values of $X$ and luminance of the Waveform and RGB Parade (figure~\ref{fig:videoscope05}).
+
+\begin{figure}[hbtp]
+       \centering
+       \includegraphics[width=0.8\linewidth]{videoscope05.png}
+       \caption{Vectorscope (with H/S pop-up box) and VectorWheel (with 3 default grids)}
+       \label{fig:videoscope05}
+\end{figure}
+
+Note that when you choose \textit{VectorWheel} from \textit{Scopes} pulldown, you can choose between different grids in the \textit{Settings} pulldown. In addition, any number of user-supplied grid patterns can be added in the form of a square image of type png.  The user can design and maintain individual grid overlays for various purposes.  The user would keep their overlays in a safe spot on their disk and make a copy of them in the \texttt{\{cinelerra\_pathname\}/bin/plugins/scopes} every time a new version of \CGG{} is installed.
 
-Vectorscope is used as monitor with other plugins to correct color, adjust image tint, and apply other effects for cinematic effects, image correction, or to conform images to look the same. For example, skin tones are found along an axis (\textit{+ I-line}) between yellow and red, and between $0$ and $50\%$ saturation values. The blue of the sky is more or less along the opposite axis to that of the skin (\textit{- I-line}), with a much wider saturation range.
+Generally the Vectorscope has the following uses:
+
+\begin{enumerate}
+       \item Compare saturation levels (radius) between Edits.
+       \item Compare the hues (angle) between Edits.
+       \item Compare skin tones, sky and vegetation.
+       \item Display the color balance or color cast.
+       \item Check the legal limits of the video signal.
+\end{enumerate}
+
+ For example, skin tones are found along an axis (\textit{+ I-line}) between yellow and red, and between $0$ and $50\%$ saturation values. The blue of the sky is more or less along the opposite axis to that of the skin (\textit{- I-line}), with a much wider saturation range.
 
 \begin{figure}[hbtp]
     \centering
     \includegraphics[width=0.9\linewidth]{videoscope04.png}
-    \caption{Balancing a yellow dominace tint}
+    \caption{Balancing a yellow color cast}
     \label{fig:videoscope04}
 \end{figure}
 
@@ -3093,7 +3214,7 @@ cin/plugins/opencv/stylizeobj.plugin
     \item create a temporary directory on your computer
     \item \texttt{cd} that-directory
     \item \texttt{tar -xf} location-of-the-tarball-you-downloaded
-    \item \texttt{cp plugins/*obj.plugin <see below for your location>/.} (note the period on the end)
+    \item \texttt{cp plugins/opencv/*obj.plugin <see below for your location>/.} (note the period on the end)
     \item Start \CGG{} and look for the six plugins in Video Effects
     \item To reverse this, simply delete the six plugin files (for example:
 
@@ -3106,7 +3227,8 @@ The location for most User installs is:
 
 Location for some System installs is:
 
-\hspace{4em}\texttt{/usr/lib/cin/plugins/} (most ubuntu distros)\\
+\hspace{4em}\texttt{/usr/lib/cin/plugins/} (most ubuntu distros)
+
 \hspace{4em}\texttt{/usr/lib64/cin/plugins/} (Leap distro)
 
 \subsection{How to Build OpenCV Plugins}%
@@ -3606,7 +3728,13 @@ The following is a list of the integrated video plug-ins.
   on top of an image which is commonly used in filmmaking. The concept
   is that you align the key elements in the image using this grid at
   the intersection of the lines or along and within the
-  vertical/horizontal lines.
+  vertical/horizontal lines.  In general the bottom and right sides of
+  the video will not be bordered by the grid.  So for example, if you
+  only add the effect to the video, there will be a frame around the
+  video with the size of the \textit{thickness}
+  but the frame is only visible on the top and left and not on the bottom
+  or left side.  You can get a line to show by using a larger thickness
+  and specifying a negative value for x and y of -2, -3, or more. 
 \item [F\_edgedetect]~\\Detects and draws edge.
 \item [F\_elbg]~\\Apply posterize effect, using the ELBG
   algorithm.