From: Good Guy Date: Fri, 25 Sep 2020 01:29:03 +0000 (-0600) Subject: Andrea has included Histogram changes, Theme addition, + other cleanup X-Git-Tag: 2021-05~53 X-Git-Url: https://git.cinelerra-gg.org/git/?a=commitdiff_plain;h=38b37e7c3c17d706638d03aa6a529bf77de05d81;p=goodguy%2Fcin-manual-latex.git Andrea has included Histogram changes, Theme addition, + other cleanup --- diff --git a/images/histogram.png b/images/histogram.png index 982d3d2..2a29f71 100644 Binary files a/images/histogram.png and b/images/histogram.png differ diff --git a/parts/Configuration.tex b/parts/Configuration.tex index 1105e34..08e1061 100644 --- a/parts/Configuration.tex +++ b/parts/Configuration.tex @@ -192,7 +192,7 @@ In the Render Farm Section are many options that are explained in detail in the \label{sub:editing_section} \begin{description} - \item[Clicking on edit boundaries] (trimming) \CGG{} not only allows you to perform editing by dragging edit boundaries, but also defines five separate operations that occur when you drag an edit boundary. Here you can select the behavior of each mouse button. The usage of each editing mode is described in great detail in the \hyperref[sub:drag_handle_management_trimming]{Editing} chapter. + \item[Clicking on edit boundaries] (trimming) \CGG{} not only allows you to perform editing by dragging edit boundaries, but also defines five separate operations that occur when you drag an edit boundary. Here you can select the behavior of each mouse button. The usage of each editing mode is described in great detail in the \hyperref[sub:split_view_compositor_using_drag_trim]{Editing} chapter. \item[Keyframe reticle] the options are \textit{Newer}, \textit{Dragging}, or \textit{Always}. This is used to help in checking edit alignment across tracks. Always renders a line over all plugins, and dragging only over the drag icon. Never draws nothing. \item[Snapshot path] designates the default directory path for snapshot and grabshot generated output. \end{description} @@ -284,8 +284,12 @@ To change a \textit{Theme} in the main window pulldown, select: \texttt{Settings $\rightarrow$ Preferences}; then in Preferences window, click on the \textit{Appearance} tab. In the Editing section in the lower left hand corner, click on the \textit{down arrow} next to Theme to see your choices. Click on your desired choice from the list given. Check OK, \CGG{} will automatically shutdown and restart. + +To create a personal theme see \hyperref[sec:how_create_theme]{How to create your own theme}. + \paragraph{Plugin Icons} here are currently 4 choices for different plugin icons to include the old original. -\paragraph{Locale} The default is \textit{sys} so that the system language is active. With the pulldown menu we can choose among the other languages present in ... This language will be saved in your Configuration and used each time you start up CinGG. In order to change the environment variable, LANGUAGE, the setting must be \textit{sys} because that is the best way we could get it working. +\paragraph{Locale} The default is \textit{sys} so that the system language is active. With the pulldown menu we can choose among the other languages present in ... This language will be saved in +your Configuration and used each time you start up CinGG. In order to change the environment variable, LANGUAGE, the setting must be \textit{sys} because that is the best way we could get it working. \paragraph{Layout Scale} allows for setting up scaling for your 4K monitors or any monitor where you would like the text and icons to be just a little bigger or a lot bigger. This scale setting is automatically saved across sessions. When first using \CGG{}, or if \textit{Layout Scale} has never been set, the initial value is 0.0. This means an automatic probe of the biggest monitor in use will be used for the setting. The advantage of this is that "new users" with a 4K monitor will not immediately be discouraged with too small text/icons. diff --git a/parts/Developer.tex b/parts/Developer.tex index 5ab309b..74774f0 100644 --- a/parts/Developer.tex +++ b/parts/Developer.tex @@ -419,7 +419,7 @@ Look into opencv4/opencv2/core/types.hpp:711;27 \section{Find Lock Problems with Booby Trap} \label{sec:find_lock_problems_booby_trap} -A Booby Trap is used in CinGG for setting a trap to catch lock problems that might have been missed. It will trap boobies only if compile by adding \textit{-{}-with-booby} on the configuration command line. This is the default if you compile using \texttt{./bld.sh} from the GIT repository. It should not interfere with normal execution. +A Booby Trap is used in \CGG{} for setting a trap to catch lock problems that might have been missed. It will trap boobies only if compile by adding \textit{-{}-with-booby} on the configuration command line. This is the default if you compile using \texttt{./bld.sh} from the GIT repository. It should not interfere with normal execution. If you have the time and inclination, enable \textit{-{}-with-booby} and send any trap output that you find. Maybe you will catch some boobies and if you do, send a snapshot of any boobies you find. @@ -642,3 +642,77 @@ $\dots$\\ The summary line above in Bold represents the User time, System time, Real time and the percentage is how much Timer time elapsed over Real time so in this case the measurement covers 47.3\% of time. So why use a Profiler? Because it is the ``ls'' for executable functions!! + +\section{How to create your own theme} +\label{sec:how_create_theme} + +A Theme is a base class object that is created and customized as \textit{ThemeName}. +It is constructed during program initialization in a theme plugin +\texttt{PluginTClient}, +defined in a \texttt{plugins/theme\_name} source directory. + +\texttt{theme\_name.C} and \texttt{theme\_name.h} are derived \textit{Theme} class object constructors. + +A Theme is constructed during initialization in \texttt{init\_theme} (\texttt{mwindow.C}). The theme plugin is accessed using the \textit{name} from preferences, and that theme plugin is loaded, and it contains the code to construct that theme. A Theme object has functions and data that \CGG{} uses to do a variety of customizations, such as \texttt{default\_window\_positions}, and it can modify GUI defaults, like \\ +\texttt{default\_text\_color}, when it is initialized. + +The theme plugin contains a \textit{new\_theme} function, that allocates and constructs a +\textit{ThemeName} object, with a base classes of \textit{BC\_Theme} (gui setup), \textit{Theme} (\CGG{} defaults), and \textit{ThemeName}, with definitions and overrides that create the custom theme. To create a new theme, a new plugin is needed: + +\begin{lstlisting}[numbers=none] + #include "header files.h" + PluginClient* new_plugin(PluginServer *server) + { + return new NameMain(server); + } + + NameMain::NameMain(PluginServer *server) + : PluginTClient(server) + { + } + + NameMain::~NameMain() + { + } + const char* NameMain::plugin_title() { return N_("Name"); } + + Theme* NameMain::new_theme() + { + theme = new ThemeName; + extern unsigned char _binary_theme_name_data_start[]; + theme->set_data(_binary_theme_name_data_start); + return theme; + } + + Name::Name() + : Theme() + { + } + + Name::~Name() + { + delete stuff; + } +\end{lstlisting} + +When a theme is constructed by \texttt{NameMain::new\_theme()}, it sets a pointer to a +block of data created in the plugin build that contains all of the png data +files in the \texttt{plugins/theme\_name/data} directory. These images may define or override the appearance of gui images, such as \textit{ok.png} (the ok button). There are usually a large number of images that need to be defined. The theme plugin adds them to the theme image data in the \texttt{theme $\rightarrow$ initialize()} function. The best list of theme image setup is probably in SUV (\texttt{plugins/theme\_suv/suv.[Ch]}). + +The easy way to create a new theme is to copy an existing theme and change +its name to \textit{ThemeName}, and be sure to \texttt{change plugin\_title()} to the new name, then tweak the definitions until you are happy with the results. The file +names and Makefile also need to be updated to the new theme \textit{name}. The source +can by manually rebuilt by invoking make in the \texttt{plugins/theme\_name} +directory. + +Once it is built into the plugin library, it will be discovered by the plugin probe, +and it will become an available theme in the \textit{Preferences}. + +If you are ready to add it to the main build, then \textit{theme\_name} should be +included in the DIRS targets of the \texttt{plugins/Makefile}, and the \texttt{plugin\_defs} needs \textit{theme\_name} in the themes list. + +Themes usually require considerable time to create from scratch. For +example, the SUV theme has over 800 lines in the initialize function, and has over +500 png images in the data directory. Most of these images and data values are +required to be initialized by the custom theme constructor; very tedious and +time consuming work. Creating a new theme is usually a lot of work. diff --git a/parts/Editing.tex b/parts/Editing.tex index f147511..d448535 100644 --- a/parts/Editing.tex +++ b/parts/Editing.tex @@ -1112,8 +1112,8 @@ There is also a faster way: \item Choose the \textit{Select edits} option and the clips inside the highlight area will be selected. \end{enumerate} -\section{Inter-View Mode\;/\;Identifying Source Targets Editing}% -\label{sec:inter-view_identifying_source_target_editing} +\section{Inter-View Mode\;/\;Identifying Source Targets}% +\label{sec:inter-view_identifying_source_target} Inter-View mode provides a mapping of a particular media file to its timeline usages. It is somewhat similar to Two Screen Editing in diff --git a/parts/Plugins.tex b/parts/Plugins.tex index 331601e..3b9a450 100644 --- a/parts/Plugins.tex +++ b/parts/Plugins.tex @@ -1698,6 +1698,33 @@ Enable the \textit{Automatic} toggle to have the histogram calculate an automati \textit{Split output} is a checkbox that enables a diagonal split showing in the compositor. \textit{Reset} returns the four curves to their initial state (neutral) as well as the Value/RGB histogram buttons. +The histogram plugin ordinarily applies a value for a single frame. A +new feature modifies histogram to show values for a selection of frames. +You use several frames in a video that you want to use the \textit{average} +color to determine the color you want the rest of the video to be. When +there is a large light or color variation within a range of a few frames, +you spend a lot of time correcting each frame when it would be better to +just get an average value to use. If you want, then you can make a LUT for +that set of frames instead of each frame. A practical case may be the shooting of a room illuminated by a lamp and then with the light off. We can choose only the range of illuminated frames and then we will have the whole shot illuminated. Or we can choose only the dark frames and so we will have all the dark shot. + +It works by selecting the area on the timeline for +which you would like to see the Histogram averaged and then click on the +\textit{Frames} button in the Histogram plugin. +The parameters are: +\textit{Linear to Log} slider: frequency in Linear range to Log range; default is +50\%, but if you want it to be the same as the Videoscope or Histogram Bezier, set the slider +all the way to Log. The variation is by 10\% steps. Linear generally represents what +the eye sees in the real world. Log is an exponential look where the small numbers are +represented more - that is, the leading digit. +\textit{Frames} button: if a Selection is set on the timeline, the number of frames +will be calculated and shown in the box next to it. +\textit{Frame Count box}: type in the number of frames you want to be looked at +starting at the insert marker or use the up/down counter. +\textit{Clear Frames} icon: reset the frame count to the default value of 0. + +A side note: by using a number of frames, you can get a \textit{dissolve-like +transition effect}. + \subsection{Histogram Bezier / Curves}% \label{sub:histogram_bezier_curves} @@ -1884,7 +1911,8 @@ Every time a keyframe is set in a loop effect, the keyframe becomes the beginnin \subsection{Motion51}% \label{sub:motion51} -This plugin compensates for unwanted motion and stabilizes the picture. The \textit{Motion51} Plugin simplifies motion stabilization so that without a lot of tweaking you can easily achieve reasonable results, either by using the defaults or varying a single parameter. Since the motion in every clip is specific, there are some additional parameters useful to adjust the settings accordingly. Alternatively, the \textit{MotionCV} and \textit{MotionHV} plugins can still be used as the originals, if more control over specific parameters is needed. The Motion51 plugin uses different methods for tracking than the other motion plugins. Motion Stabilization is very useful if you have jittery video, for example when taken from a car window, or while walking. +This plugin compensates for unwanted motion and stabilizes the picture. The \textit{Motion51} Plugin simplifies motion stabilization so that without a lot of tweaking you can easily achieve reasonable results, either by using the defaults or varying a single parameter. Since the motion in every clip is specific, there are some additional parameters useful to adjust the settings accordingly. +The Motion51 plugin uses different methods for tracking than the other motion plugins. Motion Stabilization is very useful if you have jittery video, for example when taken from a car window, or while walking. The better results require more samples. Setting the \textit{sample set size} is probably the most important setup change. Also, when computing motion compensation, the entire history of the image motion is important, and so it is desirable to enable the playback setting \textit{play every frame} in order to get good results. When every frame has to be processed, it can be time-consuming. Reasonable results are possible with small sample sets. After setup, the sample size can be increased to produce a high quality rendered result. @@ -1934,7 +1962,14 @@ The \textit{motion tracker} is almost a complete application in itself. The moti Motion tracker works by using one region of the frame as the region to track (Match Box). It compares this region between $2$ frames to calculate the motion. This region can be defined anywhere on the screen. Once the motion between $2$ frames has been calculated, a number of things can be done with that \textit{motion vector}. It can be scaled by a user value and clamped to a maximum range. It can be thrown away or accumulated with all the motion vectors leading up to the current position. -To save time the motion result can be saved in a file for later reuse, recalled from a previous calculation, or discarded. The motion tracker has a notion of $2$ tracks, the \textit{master} layer and the \textit{target} layer. The \textit{master} layer is where the comparison between $2$ frames takes place. The \textit{target} layer is where motion is applied either to track or compensate for the motion in the \textit{master} layer. +To save time the motion result can be saved in a file for later reuse, recalled from a previous calculation, or discarded. The motion tracker has a notion of $2$ tracks, the \textit{master} layer and the \textit{target} layer. The \textit{master} layer is where the comparison between $2$ frames takes place. The \textit{target} layer is where motion is applied either to track or compensate for the motion in the \textit{master} layer (figure~\ref{fig:motion}). + +% \begin{figure}[ht] +% \centering +% \includegraphics[width=0.9\linewidth]{motion.png} +% \caption{Motion plugin GUI} +% \label{fig:motion} +% \end{figure} Motion tracking parameters: @@ -1948,13 +1983,7 @@ Motion tracking parameters: \item[Block X, Y] These coordinates determine the center of the translation block based on percentages of the width and height of the image. The center of the block should be part of the image which is visible at all times. \item[Maximum absolute offset] The amount of motion detected by the motion tracker is unlimited if this is $100$. If it is under $100$ the amount of motion is limited by that percentage of the image size. \item[Motion settling speed] The motion detected between every frame can be accumulated to form an absolute motion vector. Settling speed determines how fast the accumulated translation fades away, and the image resettles to its actual appearance. If the settling speed is 0\% the total absolute vector is added to the next frame. So every frame that is processed accumulates the whole motion of the past. If the settling speed is 100\% the absolute vector is cancelled completely, adding no past translation to the next frame. If the settling speed is intermediate between 0\% and 100\% the absolute vector is downscaled by (100 $-$ settling amount) before being added to the next frame. - \item[Track rotation] Enables rotation operations. The motion tracker tracks rotation in the \textit{master} layer and adjusts rotation in the \textit{target} layer. - \item[Rotation block size] For rotation operations a single block is compared to - equally sized blocks, each rotated by a different amount. This is the size - of the rotation block. In this implementation of the \textit{Motion} plugin the same - block is used to track both translation and rotation, and this parameter is - not used. However, in some other implementations, like \hyperref[sub:motioncv]{MotionCV}, \textit{Rotation - block size} is specified explicitly via this extra parameter. + \item[Track rotation] Enables rotation operations. The motion tracker tracks rotation in the \textit{master} layer and adjusts rotation in the \textit{target} layer. \item[Rotation search radius] This is the maximum angle of rotation from the starting frame the rotation scanner can detect. The rotation scan is from this angle counterclockwise to this angle clockwise. Thus the \textit{Rotation search radius} is half the total range scanned. \item[Rotation search steps] Ideally every possible angle would be tested to get the rotation. To speed up the rotation search, the \textit{Rotation search radius} is divided into a finite number of angles and only those angles compared to the starting frame. Then the search radius is narrowed and an equal number of angles is compared in the smaller radius until the highest possible accuracy is achieved. Normally you need one search step for every degree scanned. Since the rotation scanner scans the \textit{Rotation search radius} in two directions, you need two steps for every degree in the search radius to search the complete range. \item[Rotation center] Usually this parameter is zero, and the rotation search @@ -2276,16 +2305,6 @@ Uses X/Y camera automation vectors to apply a linear blur trailing camera direct \item[Steps] number of blur steps to be used in the calculation. Increasing the number takes more CPU. \end{description} -\subsection{MotionCV}% -\label{sub:motioncv} - -Extended motion tracking/stabilization from the community version of \CGG{}. For theory and explanations refer to the \hyperref[sub:motion]{Motion} plugin. - -\subsection{MotionHV}% -\label{sub:motionhv} - -Updated motion tracking/stabilization of 2017 from the original author of \CGG{}. For theory and explanations refer to the \hyperref[sub:motion]{Motion} plugin. - \subsection{Oil painting}% \label{sub:oil_painting} @@ -3274,18 +3293,18 @@ Modify the 411 yuv to look like 420 color space instead. If the edit to which th \subsection{YUVShift}% \label{sub:yuvshift} +\begin{figure}[hbtp] + \centering + \includegraphics[width=0.8\linewidth]{yuvshift.png} + \caption{Before and after YUVShift adjusting} + \label{fig:yuvshift} +\end{figure} + This effect is used for YUV input video from older cameras using $3$ sensors. It is possible to have misalignment of the $3$ sets of numbers: \textit{Y}, which represents the luminance or brightness component, and for \textit{U} and \textit{V} representing the chrominance (color) components. If they were misaligned in the video, you can use \textit{YUVShift} to realign. To move a specific component up/down, modify the \textit{dy} value using the slider bar in the RGBShift window. To move a component left/right, modify the corresponding \textit{dx} value. With the Clear buttons we can bring the slider to default values without affecting the other parameters. If you are using an RGB color space, you will want to use the \textit{RGBShift} effect instead. Figure~\ref{fig:yuvshift} (top) shows the blue \textit{U} component aligned too far to the left. And the red \textit{V} component is misaligned too far to the right. Note the \textit{U\_dx} current slider bar set to $0$ as shown by the yellow box value in the YUVShift plugin window. All components are currently at zero. A corrected video image is shown in the bottom. Now the red and blue colors are correctly aligned. Note how \textit{U\_dx} is now at $+20$ and \textit{V\_dx} is now negative to realign the image. -\begin{figure}[hbtp] - \centering - \includegraphics[width=0.8\linewidth]{yuvshift.png} - \caption{Before and after YUVShift adjusting} - \label{fig:yuvshift} -\end{figure} - \subsection{Zoom Blur}% \label{sub:zoom_blur} diff --git a/parts/Windows.tex b/parts/Windows.tex index 44b8bd4..57c30ca 100644 --- a/parts/Windows.tex +++ b/parts/Windows.tex @@ -1047,7 +1047,9 @@ When you click \textit{Load} preset, keep in mind that it will write the mask nu \label{ssub:position_scale_section} \textit{Center} mask button allows for quickly centering a mask on the video track. -\textit{Normalize} mask button makes it easy to normalize the size of the mask based on the scale of the video. +\textit{Normalize} mask button makes it easy to normalize the size of the mask based on the scale of the video - about 1/4 the window size in the X and Y +directions. Normalization makes the mask fit in the space to avoid having +it wander off of the window, then you can move it around easily before resizing. The next 3 symbols concern the direction to \textit{drag translate} a mask using the \texttt{Alt+LMB} thus making it easy to preserve the current $X$ or $Y$ value when desirable. For some desktop window managers, such as \textit{UbuntuStudio 16.4} and \textit{Arch}, the Alt key is already in use by the Operating System so you will have to use Alt+Ctrl instead.