diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0f8039e820094bb9b31cec212c6acb2136e1a3e6..01bbc238b7290b04b256db2f2b82ab0cd6d74cd9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,3 +1,22 @@
+##
+## PeTrack - Software for tracking pedestrians movement in videos
+## Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+## Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+## Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+##
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program.  If not, see <https://www.gnu.org/licenses/>.
+##
 stages:
   - build_environment
   - build
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f20ee0af4d63b6eb2dbdf73ae8c24520c3f26df4..46fe1c81d4ea9cb9ba27675873a54b364dff316d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -296,7 +296,6 @@ target_sources(petrack_core PRIVATE
     include/codeMarkerItem.h
     include/multiColorMarkerItem.h
     include/backgroundItem.h
-    include/whitebalance.h
     include/person.h
     include/qtColorTriangle.h
     include/swapFilter.h
@@ -349,7 +348,6 @@ target_sources(petrack_core PRIVATE
     src/codeMarkerItem.cpp
     src/multiColorMarkerItem.cpp
     src/backgroundItem.cpp
-    src/whitebalance.cpp
     src/person.cpp
     src/qtColorTriangle.cpp
     src/swapFilter.cpp
diff --git a/LICENSE b/LICENSE
index db3402aa63fb8e1e7a2c341091d0755bdb351490..f288702d2fa16d3cdf0035b15a9fcbc552cd88e7 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,3 +1,674 @@
-The software PeTrack is free.
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
 
-This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
\ No newline at end of file
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <https://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    <program>  Copyright (C) <year>  <name of author>
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<https://www.gnu.org/licenses/>.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+<https://www.gnu.org/licenses/why-not-lgpl.html>.
diff --git a/ReadMe.md b/ReadMe.md
index b37f08c111ccd032d6d50fcc307c386123cd30b8..6b7fd31e4075f3334ffec12c53f47197a3f547a7 100644
--- a/ReadMe.md
+++ b/ReadMe.md
@@ -31,6 +31,9 @@ with saving the project to project.pet again:
 petrack.exe -project project.pet -sequence frame000.jpg -autoTrack tracker_file -autoSave project.pet
 ```
 
+## License
+This project is licensed under the terms of the GPLv3 license. For further information see [LICENSE](./LICENSE).
+
 ## Changelog:
 v0.8 : slanted view for external calibration, coordinate system and grid is possible, introduced multicolor marker with black dot, video support for various codecs <br/>
 v0.7 : introduce stereo cameras; alternate height <br/>
diff --git a/include/analysePlot.h b/include/analysePlot.h
index 4555dc566e265dbf020578f90d1246c061e60ea5..6fb098f75762242acdacaf658db4cd6b84a54224 100644
--- a/include/analysePlot.h
+++ b/include/analysePlot.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef ANALYSEPLOT_H
 #define ANALYSEPLOT_H
 
diff --git a/include/animation.h b/include/animation.h
index a6af99533d8b91a4ae96ed551a0aeeb131516daf..acf6ddf4866faad70ba4f6c117b33b69fdb18de2 100644
--- a/include/animation.h
+++ b/include/animation.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 /*
 
 Class Animation
@@ -68,6 +88,8 @@ public:
 //    IplImage* getCurrentFrame();
     cv::Mat getCurrentFrame();
 
+    void skipFrame(int num = 1);
+
     // Return String with current time
     QString getTimeString(int frame = -1);
 
@@ -91,9 +113,6 @@ public:
     // Returns the index of the current frame  
     int getCurrentFrameNum();
 
-    // Returns the speedup to accelerate the video speed
-    int getSpeedup();
-
     // Sets the sourceIn/Out frame numbers
     void updateSourceInFrameNum(int in=-1);
     void updateSourceOutFrameNum(int out=-1);
@@ -180,9 +199,6 @@ private:
     // Index of the current opened frame 
     int mCurrentFrame;
 
-    // Speed up to accelerate the video speed
-    int mSpeedup;
-
     // Index of sourceIn/Out frame
     int mSourceInFrame;
     int mSourceOutFrame;
diff --git a/include/autoCalib.h b/include/autoCalib.h
index 248a56a88195d87d8829a3733cb403ad01f5e2d9..635a83c8fedec7924f62b967ad7055983aeb9426 100644
--- a/include/autoCalib.h
+++ b/include/autoCalib.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef AUTOCALIB_H
 #define AUTOCALIB_H
 
diff --git a/include/aviFileWriter.h b/include/aviFileWriter.h
index 5cc75ad46279bbc8dadef6854473ac219059e8d3..3462253ee2239de130d977271ae5900f67e7d727 100644
--- a/include/aviFileWriter.h
+++ b/include/aviFileWriter.h
@@ -1,3 +1,22 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
 
 #undef UNICODE
 
diff --git a/include/backgroundFilter.h b/include/backgroundFilter.h
index 77c30b9cf0b44ecb961c35e851ff8feb4fefc034..ca0f5bbe3ea4ec7cf62254ca9f8a7b088eceed45 100644
--- a/include/backgroundFilter.h
+++ b/include/backgroundFilter.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef BACKGROUNDFILTER_H
 #define BACKGROUNDFILTER_H
 
diff --git a/include/backgroundItem.h b/include/backgroundItem.h
index 86cb8ee5e452bc58ab0aa5b9748e4b534e6083c3..3d08928ab0791c4fcc79401a6533b00fd1f47142 100644
--- a/include/backgroundItem.h
+++ b/include/backgroundItem.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef BACKGROUNDITEM_H
 #define BACKGROUNDITEM_H
 
diff --git a/include/blurFilter.h b/include/blurFilter.h
index 65ffceca2e53be3702cf435e9c530aa419dcc01c..71e78617c22c801454434b35e627a644a7d837c5 100644
--- a/include/blurFilter.h
+++ b/include/blurFilter.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef BLURFILTER_H
 #define BLURFILTER_H
 
diff --git a/include/borderFilter.h b/include/borderFilter.h
index 8e658fd25de4252a322e3bb5fb3c933058df71f3..6b23a62fc5f716b7482a1b71e447081f1fb6f4d2 100644
--- a/include/borderFilter.h
+++ b/include/borderFilter.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef BORDERFILTER_H
 #define BORDERFILTER_H
 
diff --git a/include/brightContrastFilter.h b/include/brightContrastFilter.h
index 1ade1af2ead68eb42f94f108887cb23d79c4f356..8ce1a98941bf0ad6a0b035917b9225c4e28cc6cc 100644
--- a/include/brightContrastFilter.h
+++ b/include/brightContrastFilter.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef BRIGHTCONTRASTFILTER_H
 #define BRIGHTCONTRASTFILTER_H
 
diff --git a/include/brightFilter.h b/include/brightFilter.h
index a930b1ffc2f748b2187a3aca3d0ec1c1ac5269d2..e82e41fcc74aae1556c5404aade56c0fe89a021e 100644
--- a/include/brightFilter.h
+++ b/include/brightFilter.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef BRIGHTFILTER_H
 #define BRIGHTFILTER_H
 
diff --git a/include/calibFilter.h b/include/calibFilter.h
index 7bb292c0db829c1c616253ad949ade326b68f6f7..19b391446ab36aff42961d430b75337a894bbf67 100644
--- a/include/calibFilter.h
+++ b/include/calibFilter.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef CALIBFILTER_H
 #define CALIBFILTER_H
 
diff --git a/include/calibStereoFilter.h b/include/calibStereoFilter.h
index 4af96fed4daf692e11b8b70c5ee6e5775fc7fbbf..0535df6ecc3625274c83b0701274f7216faafbf2 100644
--- a/include/calibStereoFilter.h
+++ b/include/calibStereoFilter.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef CALIBSTEREOFILTER_H
 #define CALIBSTEREOFILTER_H
 
diff --git a/include/codeMarkerItem.h b/include/codeMarkerItem.h
index 1fd656651ffd292169faac7bac9f0ccd1c753d18..6fb7c2a30baf90932d2a56f7e069560243f00a54 100644
--- a/include/codeMarkerItem.h
+++ b/include/codeMarkerItem.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef CodeMarkerItem_H
 #define CodeMarkerItem_H
 
diff --git a/include/codeMarkerWidget.h b/include/codeMarkerWidget.h
index e2b4b2813d4d590032ea50d6e90f063ca9c81ed2..1560f27dc1d4c16a1b3aeeb83c1479f2c46f701a 100644
--- a/include/codeMarkerWidget.h
+++ b/include/codeMarkerWidget.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef CODEMARKERWIDGET_H
 #define CODEMARKERWIDGET_H
 
diff --git a/include/colorMarkerItem.h b/include/colorMarkerItem.h
index 562c6578f8d5d6b261b3ed6bfbadc71bdc3160e9..d3cbd33c0765f70d5578548837eb0063a90fa323 100644
--- a/include/colorMarkerItem.h
+++ b/include/colorMarkerItem.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef ColorMarkerItem_H
 #define ColorMarkerItem_H
 
diff --git a/include/colorMarkerWidget.h b/include/colorMarkerWidget.h
index eba6fe5dde400a7ca2fe4a128c2abf3e408b269a..b5c0d7c6b1181f8a65c2eb8be743d676ec2cbe04 100644
--- a/include/colorMarkerWidget.h
+++ b/include/colorMarkerWidget.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef COLORMARKERWIDGET_H
 #define COLORMARKERWIDGET_H
 
diff --git a/include/colorPlot.h b/include/colorPlot.h
index b59fac8439fc44339c8f9c925d1351aec58e7955..a4efa09505fee87751e66451a2090b90629d74ee 100644
--- a/include/colorPlot.h
+++ b/include/colorPlot.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef COLORPLOT_H
 #define COLORPLOT_H
 
@@ -48,27 +68,27 @@ public:
         : mColored(true), mMapHeight(DEFAULT_HEIGHT), mInversHue(false)
     {
         setRect(0., 0., 0., 0.);
-        mFromCol = mFromCol.toHsv();
-        mToCol = mToCol.toHsv();
+        mFromCol = QColor::fromHsv(0,0,0);
+        mToCol = QColor::fromHsv(359,255,255);
     }
     RectMap(QRectF r)
         : QRectF(r), mInversHue(false)
     {
         setRect(0., 0., 0., 0.);
-        mFromCol = mFromCol.toHsv();
-        mToCol = mToCol.toHsv();
+        mFromCol = QColor::fromHsv(0,0,0);
+        mToCol = QColor::fromHsv(359,255,255);
     }
     RectMap(double x, double y, double w, double h, bool colored, double mapHeight)
         : QRectF(x, y, w, h), mColored(colored), mMapHeight(mapHeight), mInversHue(false)
     {
-        mFromCol = mFromCol.toHsv();
-        mToCol =mToCol.toHsv();
+        mFromCol = QColor::fromHsv(0,0,0);
+        mToCol = QColor::fromHsv(359,255,255);
     }
     RectMap(QRectF r, bool colored, double mapHeight)
         : QRectF(r), mColored(colored), mMapHeight(mapHeight), mInversHue(false)
     {
-        mFromCol = mFromCol.toHsv();
-        mToCol = mToCol.toHsv();
+        mFromCol = QColor::fromHsv(0,0,0);
+        mToCol = QColor::fromHsv(359,255,255);
     }
     inline bool colored() const
     {
diff --git a/include/colorRangeWidget.h b/include/colorRangeWidget.h
index ce8c747b2795eef30b701d58480d0c5c74e9318a..b347f1a2818a9f2c29726bb1d91a1e07dcabc844 100644
--- a/include/colorRangeWidget.h
+++ b/include/colorRangeWidget.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef COLORRANGEWIDGET_H
 #define COLORRANGEWIDGET_H
 
diff --git a/include/contrastFilter.h b/include/contrastFilter.h
index 88431504ce83db81f2f7ebc80d0a4be3c73ae165..10f72d1d5b733e3db6d483a7f87dd3599c25b187 100644
--- a/include/contrastFilter.h
+++ b/include/contrastFilter.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef CONTRASTFILTER_H
 #define CONTRASTFILTER_H
 
diff --git a/include/control.h b/include/control.h
index 1cd5a1b75b559095350608636368285ce40ce59a..d8e1928bb39e1a10e34fcba9c3e3eba0cfe8b3bd 100644
--- a/include/control.h
+++ b/include/control.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef CONTROL_H
 #define CONTROL_H
 
@@ -172,9 +192,9 @@ public:
     int getCalibGrid3DResolution();
     void setCalibGrid3DResolution(int i);
 
-    void expandRange(QColor& fromColor, QColor& toColor, const std::array<int, 3>& clickedColor);
+    void expandRange(QColor& fromColor, QColor& toColor, const QColor& clickedColor);
     void saveChange(const QColor& fromColor, const QColor& toColor, RectPlotItem* map);
-    bool getColors(QPoint& p, GraphicsView* graphicsView, std::array<int, 3>& clickedColor, QColor& toColor, QColor& fromColor, RectPlotItem*& map);
+    bool getColors(QColor& clickedColor, QColor& toColor, QColor& fromColor, RectPlotItem*& map);
 
     void setXml(QDomElement &elem);
     void getXml(QDomElement &elem);
@@ -245,8 +265,8 @@ private slots:
     void on_mapResetHeight_clicked();
     void on_mapResetPos_clicked();
     void on_mapDefaultHeight_valueChanged(double d);
-    void on_expandColor(QPoint p, GraphicsView* graphicsView);
-    void on_setColor(QPoint, GraphicsView*);
+    void on_expandColor();
+    void on_setColor();
 
 
     void on_trackShow_stateChanged(int i);
diff --git a/include/coordItem.h b/include/coordItem.h
index 86b8ea68d61f3d119e0443b5ce57e592ec0a5067..8908e04060cf3325a91348492d33c751e11140ba 100644
--- a/include/coordItem.h
+++ b/include/coordItem.h
@@ -1,4 +1,24 @@
-#ifndef COORDITEM_H
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
+#ifndef COORDITEM_H
 #define COORDITEM_H
 
 #include <QGraphicsItem>
diff --git a/include/ellipse.h b/include/ellipse.h
index 3f50721d20b2499f2acaec0a2d945189e9ee8d60..d567918e8a3a66fe2609996d8a8bce7589bd5780 100644
--- a/include/ellipse.h
+++ b/include/ellipse.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef ELLIPSE_H
 #define ELLIPSE_H
 
diff --git a/include/extrCalibration.h b/include/extrCalibration.h
index 9e5db71e55227d3b00b6a33c9bad2427a22b75bd..092b7830e43881008187438d2ce6bb92fba700a2 100644
--- a/include/extrCalibration.h
+++ b/include/extrCalibration.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef EXTRCALIBRATION_H
 #define EXTRCALIBRATION_H
 
diff --git a/include/filter.h b/include/filter.h
index 3dabd9ab4556159c907d3cd082e217b49934e95b..67bc0f53e02dc117fc90020a334be9a9f1b092d8 100644
--- a/include/filter.h
+++ b/include/filter.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef FILTER_H
 #define FILTER_H
 
diff --git a/include/gridItem.h b/include/gridItem.h
index c936ba5520be0cff0a6c7b08b69a86bf82088a92..5bd84bfcd33854c3382bc41ecf682dd8e23a05f4 100644
--- a/include/gridItem.h
+++ b/include/gridItem.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef GRIDITEM_H
 #define GRIDITEM_H
 
diff --git a/include/helper.h b/include/helper.h
index 68f07c4b64bcc9872d6f05fa267426fc997c35c3..b3036c9ab11f3563d561b92739ea6819ad74c960 100644
--- a/include/helper.h
+++ b/include/helper.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef HELPER_H
 #define HELPER_H
 
diff --git a/include/imageItem.h b/include/imageItem.h
index 15985c6d527197d379cb3aadaaf2b65fddc003bd..4f103c6465bd58134d3a9b648d1bc836292225c6 100644
--- a/include/imageItem.h
+++ b/include/imageItem.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef IMAGEITEM_H
 #define IMAGEITEM_H
 
diff --git a/include/logoItem.h b/include/logoItem.h
index ddcb1e9afef6bfa236b0c4ca88b31376e0df3f78..8aa2756ce81b071b719d49609b24425ea9be4161 100644
--- a/include/logoItem.h
+++ b/include/logoItem.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef LOGOITEM_H
 #define LOGOITEM_H
 
diff --git a/include/markerCasern.h b/include/markerCasern.h
index 1eb6157f32285a68c24b1f3635be86854caca6d0..d4a542480855d6aa5327d45e6d04bc2db39e365f 100644
--- a/include/markerCasern.h
+++ b/include/markerCasern.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef MARKERCASERN_H
 #define MARKERCASERN_H
 
diff --git a/include/markerColor.h b/include/markerColor.h
index 4acbffcd6245aab3775b8e9527e076d9b1d62f5b..2ea6d62840f1673f511e9ce1dc774f27e3ec7bed 100644
--- a/include/markerColor.h
+++ b/include/markerColor.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef MARKERCOLOR_H
 #define MARKERCOLOR_H
 
diff --git a/include/markerHermes.h b/include/markerHermes.h
index 8d96da4a132e46d5d972e3a232f8000117726432..aba58823b7fa64473d9e128b1f8d866bdb9f45cb 100644
--- a/include/markerHermes.h
+++ b/include/markerHermes.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef MARKERHERMES_H
 #define MARKERHERMES_H
 
diff --git a/include/markerJapan.h b/include/markerJapan.h
index 552092a7deeb6738b1c37f14549aa08604585ea2..3b61f04651b372b0728aa97d132ec63dee3f7c74 100644
--- a/include/markerJapan.h
+++ b/include/markerJapan.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef MarkerJapan_H
 #define MarkerJapan_H
 
diff --git a/include/multiColorMarkerItem.h b/include/multiColorMarkerItem.h
index 7195d2a7c45d0f3e071a01867c5022c3b908604f..c897454e3096634273fe4d2d6dd61325a1e6fa84 100644
--- a/include/multiColorMarkerItem.h
+++ b/include/multiColorMarkerItem.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef MultiColorMarkerItem_H
 #define MultiColorMarkerItem_H
 
diff --git a/include/multiColorMarkerWidget.h b/include/multiColorMarkerWidget.h
index 7876d1b20d521240a56c18219325ab472dcdf242..52ce70ff5a32c24cfccc259df09d3f1263b1aeb9 100644
--- a/include/multiColorMarkerWidget.h
+++ b/include/multiColorMarkerWidget.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef MULTICOLORMARKERWIDGET_H
 #define MULTICOLORMARKERWIDGET_H
 
diff --git a/include/person.h b/include/person.h
index c81b1b5ab1863c56e3eb91f2306a9f67c827d9e9..5bb71cd7b83e2504ae78cbe7efade7c04f2c4119 100644
--- a/include/person.h
+++ b/include/person.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef PERSON_H
 #define PERSON_H
 
diff --git a/include/petrack.h b/include/petrack.h
index 560c7f2abb3c5712ab1c6e394f37bbae539001c2..468976444e17705015ec85ab166565bf79efa4e8 100644
--- a/include/petrack.h
+++ b/include/petrack.h
@@ -1,4 +1,24 @@
-#ifndef PETRACK_H
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
+#ifndef PETRACK_H
 #define PETRACK_H
 
 #include <QMainWindow>
@@ -145,7 +165,7 @@ public:
     void setStatusTime();
     void setStatusFPS();
     void setShowFPS(double fps);
-    void updateShowFPS();
+    void updateShowFPS(bool skipped = false);
     void setStatusPosReal(const QPointF &pos);
     void setStatusPos(const QPoint &pos);
     void setStatusColor(const QRgb &col);
@@ -454,15 +474,17 @@ private:
     QAction *mFitROIAct;
     QAction *mCameraLeftViewAct;
     QAction *mCameraRightViewAct;
-    QAction *mFixToRealtime;
-    QAction *mFixTo0p75;
-    QAction *mFixTo0p50;
-    QAction *mFixTo0p25;
-    QAction *mFixTo1p25;
-    QAction *mFixTo1p50;
-    QAction *mFixTo1p75;
-    QAction *mFixTo2p00;
-    QAction *mFixUnlimited;
+    QAction *mLimitPlaybackSpeed;
+    QAction *mFixPlaybackSpeed;
+    QAction *mSetToRealtime;
+    QAction *mSetTo0p75;
+    QAction *mSetTo0p50;
+    QAction *mSetTo0p25;
+    QAction *mSetTo1p25;
+    QAction *mSetTo1p50;
+    QAction *mSetTo1p75;
+    QAction *mSetTo2p00;
+    QAction *mPlayerLooping;
     QAction *mDelPastAct;
     QAction *mDelFutureAct;
     QAction *mDelAllRoiAct;
@@ -472,7 +494,7 @@ private:
     QAction *mAboutAct;
     QAction *mOnlineHelpAct;
     QActionGroup *mCameraGroupView;
-    QMenu *mFixPlaybackSpeedMenu;
+    QMenu *mPlaybackSpeedMenu;
 
     QMenu *mFileMenu;
     QMenu *mViewMenu;
diff --git a/include/player.h b/include/player.h
index 95e0e7e1ded276a83ccef7b878bee7f65ca4d766..86ef443bae8f935f15d30121a7fe9600160f7a50 100644
--- a/include/player.h
+++ b/include/player.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef PLAYER_H
 #define PLAYER_H
 
@@ -23,6 +43,12 @@ class QDoubleValidator;
 class Animation;
 class Petrack;
 
+enum class PlayerState{
+    FORWARD,
+    BACKWARD,
+    PAUSE
+};
+
 class Player : public QWidget
 {
     Q_OBJECT
@@ -30,13 +56,11 @@ public:
     Player(Animation *anim, QWidget *parent = 0);
     void setAnim(Animation *anim);
     bool getPaused();
-    void fixSpeedRelativeToRealtime(double factor);
+    void setSpeedRelativeToRealtime(double factor);
 
 public slots:
     bool frameForward();
     bool frameBackward();
-    void playForward();
-    void playBackward();
     void recStream();
     void pause();
     void togglePlayPause();
@@ -45,15 +69,17 @@ public slots:
     bool skipToFrame();
     void update();
     void setFPS(double fps=-1.);
-    void togglePlayerSpeedFixed();
+    void togglePlayerSpeedLimited();
+    void setPlayerSpeedLimited(bool fixed);
+    bool getPlayerSpeedLimited();
     void setPlayerSpeedFixed(bool fixed);
-    bool getPlayerSpeedFixed();
+    void setLooping(bool looping);
     void setFrameInNum(int in=-1.);
     void setFrameOutNum(int out=-1.);
     int getFrameInNum();
     int getFrameOutNum();
     int getPos();
-    bool done();
+    void play(PlayerState state);
 
 
 private:
@@ -62,12 +88,14 @@ private:
     bool updateImage();
     bool forward();
     bool backward();
+    void playVideo();
 
     Animation *mAnimation;    
     QTemporaryFile mTmpFile;
-    bool mPlayF;
-    bool mPlayB;
-    bool mPlayerSpeedFixed;
+    PlayerState mState = PlayerState::PAUSE;
+    bool mPlayerSpeedLimited;
+    bool mPlayerSpeedFixed = false;
+    bool mLooping = false;
     bool mSliderSet;
     bool mRec;
 
@@ -98,6 +126,7 @@ private:
     QIntValidator *mFrameInNumValidator;
     QIntValidator *mFrameOutNumValidator;
     QDoubleValidator *mFpsNumValidator;
+
 };
 
 #endif
diff --git a/include/qtColorTriangle.h b/include/qtColorTriangle.h
index e690d185b43689d542e4284413c1cb61f3970ba8..c89faf39573b99459f203bca7df8814b10984fc5 100644
--- a/include/qtColorTriangle.h
+++ b/include/qtColorTriangle.h
@@ -1,17 +1,17 @@
 /****************************************************************************
-** 
+**
 ** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
-** 
+**
 ** This file is part of a Qt Solutions component.
 **
-** Commercial Usage  
+** Commercial Usage
 ** Licensees holding valid Qt Commercial licenses may use this file in
 ** accordance with the Qt Solutions Commercial License Agreement provided
 ** with the Software or, alternatively, in accordance with the terms
 ** contained in a written agreement between you and Nokia.
-** 
+**
 ** GNU Lesser General Public License Usage
 ** Alternatively, this file may be used under the terms of the GNU Lesser
 ** General Public License version 2.1 as published by the Free Software
@@ -19,29 +19,29 @@
 ** packaging of this file.  Please review the following information to
 ** ensure the GNU Lesser General Public License version 2.1 requirements
 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-** 
+**
 ** In addition, as a special exception, Nokia gives you certain
 ** additional rights. These rights are described in the Nokia Qt LGPL
 ** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
 ** package.
-** 
-** GNU General Public License Usage 
+**
+** GNU General Public License Usage
 ** Alternatively, this file may be used under the terms of the GNU
 ** General Public License version 3.0 as published by the Free Software
 ** Foundation and appearing in the file LICENSE.GPL included in the
 ** packaging of this file.  Please review the following information to
 ** ensure the GNU General Public License version 3.0 requirements will be
 ** met: http://www.gnu.org/copyleft/gpl.html.
-** 
+**
 ** Please note Third Party Software included with Qt Solutions may impose
 ** additional restrictions and it is the user's responsibility to ensure
 ** that they have met the licensing requirements of the GPL, LGPL, or Qt
 ** Solutions Commercial license and the relevant license of the Third
 ** Party Software they are using.
-** 
+**
 ** If you are unsure which license is appropriate for your use, please
 ** contact Nokia at qt-info@nokia.com.
-** 
+**
 ****************************************************************************/
 
 // siehe fuer Doku: http://docs.huihoo.com/qt/solutions/4/qtcolortriangle/qtcolortriangle.html
diff --git a/include/recognition.h b/include/recognition.h
index 4083367c9b4f0f926851a2a9db8873f30df14c3f..568452ad182f5c02684e53011f546aab943a8183 100644
--- a/include/recognition.h
+++ b/include/recognition.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef RECOGNITION_H
 #define RECOGNITION_H
 
diff --git a/include/recognitionRoiItem.h b/include/recognitionRoiItem.h
index b2f63e0b6a9a1c28eae1c00ac9e1a4beb6e281a9..bb2750a85d6c68b5711e8e2823dd85b831981756 100644
--- a/include/recognitionRoiItem.h
+++ b/include/recognitionRoiItem.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef RECOGNITIONROIITEM_H
 #define RECOGNITIONROIITEM_H
 
diff --git a/include/stereoAviFile.h b/include/stereoAviFile.h
index de7b14010aad036ebbabb7cb95f39d308bb2fe41..74df05550bf074972a1f49a712b7714fb14581f9 100644
--- a/include/stereoAviFile.h
+++ b/include/stereoAviFile.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef STEREO_DISABLED
 #ifndef STEREOAVIFILE_H
 #define STEREOAVIFILE_H
diff --git a/include/stereoContext.h b/include/stereoContext.h
index 65cf8e8532a84a056aa9b3d2296a83300df61408..289000793bfad99173e1c6f0a0b4266e346e8184 100644
--- a/include/stereoContext.h
+++ b/include/stereoContext.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef STEREOCONTEXT_H
 #define STEREOCONTEXT_H
 
diff --git a/include/stereoItem.h b/include/stereoItem.h
index 0725e96f32a6e789ef8c2aa72b49b894a2698c3e..41c28b3e48029bcc94223cf187c1e9571673ae26 100644
--- a/include/stereoItem.h
+++ b/include/stereoItem.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef STEREOITEM_H
 #define STEREOITEM_H
 
diff --git a/include/stereoWidget.h b/include/stereoWidget.h
index b16d7b656c245f8b14a7cc7626e8c4094c3688bf..cd173edcb647c2a1eb8a6af1c57d8930ef1cb4b2 100644
--- a/include/stereoWidget.h
+++ b/include/stereoWidget.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef STEREOWIDGET_H
 #define STEREOWIDGET_H
 
@@ -92,7 +112,7 @@ private slots:
         }
     }
     // funkioniert noch nicht richtig, da trotz des sprungs nach preprocess
-    // zuerst das ergebniss des zulöetzt berechneten frames mit edge angezeigt wird!!!!!!!!!
+    // zuerst das ergebniss des zuletzt berechneten frames mit edge angezeigt wird!!!!!!!!!
     void on_useEdge_stateChanged(int i)
     {
         if (mMainWindow->getStereoContext())
diff --git a/include/swapFilter.h b/include/swapFilter.h
index adcc5b2a4de60e6c11fd3be0e09cd46998598e1b..0b097f25c323d268c82a6d86734083e28eded103 100644
--- a/include/swapFilter.h
+++ b/include/swapFilter.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef SWAPFILTER_H
 #define SWAPFILTER_H
 
diff --git a/include/tracker.h b/include/tracker.h
index 1d5f024cabffea042898d89bca75510131989680..255783b2dda765b3d5962754cb01a55ef7da99db 100644
--- a/include/tracker.h
+++ b/include/tracker.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef TRACKER_H
 #define TRACKER_H
 
@@ -301,6 +321,17 @@ public:
     {
         return mComment;
     }
+    /**
+     * @brief Get the comment without line breaks
+     *
+     * Get the comment as a one line QString where all linebreak are replaced with '<br>'
+     * @return comment without line breaks
+     */
+    inline QString serializeComment() const
+    {
+        return QString{mComment}.replace(QRegularExpression("\n"), "<br>");
+    }
+
     inline void setComment(QString s)
     {
         mComment = s;
@@ -368,7 +399,7 @@ inline QTextStream& operator>>(QTextStream& s, TrackPerson& tp)
         //s.skipWhiteSpace(); // skip white spaces for reading the comment line without this the reading makes some problems
         // Kommentarzeile lesen
         str = s.readLine();
-        tp.setComment(str);
+        tp.setComment(str.replace(QRegularExpression("<br>"), "\n"));
         //cout << " comment: " << tp.comment() << endl;
         //if ( !comment.isEmpty())
         //    s.skipWhiteSpace();
@@ -391,7 +422,7 @@ inline QTextStream& operator<<(QTextStream& s, const TrackPerson& tp)
         s << " " <<tp.getMarkerID();
     }
     s << " " << tp.size();
-    s << Qt::endl << tp.comment() << Qt::endl;
+    s << Qt::endl << tp.serializeComment() << Qt::endl;
     for (int i = 0; i < tp.size(); ++i)
         s << tp.at(i) << Qt::endl;
     return s;
@@ -405,7 +436,7 @@ inline std::ostream& operator<<(std::ostream& s, const TrackPerson& tp)
         s <<  " " << tp.getMarkerID();
     }
     s << " " << tp.size();
-    s << std::endl << tp.comment() << std::endl;
+    s << std::endl << tp.serializeComment() << std::endl;
     for (int i = 0; i < tp.size(); ++i)
         s << tp.at(i) << std::endl;
     return s;
@@ -453,7 +484,7 @@ public:
     void delPointAll(int direction, int frame);
     void delPointROI();
     void delPointInsideROI();
-    bool editTrackPersonComment(const Vec2F& p, int frame, QSet<int> onlyVisible);
+    bool editTrackPersonComment(const Vec2F& p, int frame, const QSet<int>& onlyVisible);
     bool setTrackPersonHeight(const Vec2F& p, int frame, QSet<int> onlyVisible);
     bool resetTrackPersonHeight(const Vec2F& p, int frame, QSet<int> onlyVisible);
 
diff --git a/include/trackerItem.h b/include/trackerItem.h
index c181ac2e162ecd76a401dc468740b33a967b48ad..009b1e57c60b3497116955aaac89001b1ad8aa25 100644
--- a/include/trackerItem.h
+++ b/include/trackerItem.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef TRACKERITEM_H
 #define TRACKERITEM_H
 
diff --git a/include/trackerReal.h b/include/trackerReal.h
index 80270387435a92038379dbe33202d69f46ed7141..0dde19968cf2c66bff9d977515d64b033f3dfe30 100644
--- a/include/trackerReal.h
+++ b/include/trackerReal.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef TRACKERREAL_H
 #define TRACKERREAL_H
 
diff --git a/include/trackingRoiItem.h b/include/trackingRoiItem.h
index 23f28f98746edda8f3b81bf39f12fd10b11b48c4..a3714e98b07d50c3153d737006e928fdaeffbd94 100644
--- a/include/trackingRoiItem.h
+++ b/include/trackingRoiItem.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef TRACKINGROIITEM_H
 #define TRACKINGROIITEM_H
 
diff --git a/include/vector.h b/include/vector.h
index 18f7f4618b16e1c4df0a27a7b6f4b94ec9f5cf82..41931c56a94aa8eb76b3be88cd3ae0bfec10a4c4 100644
--- a/include/vector.h
+++ b/include/vector.h
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef VECTOR_HH
 #define VECTOR_HH
 
diff --git a/include/view.h b/include/view.h
index 1d28bef0513812675a271ef632da9b289c7aa8f6..54b4b13c7dd8d9941aeb866b06acaace03ab52dc 100644
--- a/include/view.h
+++ b/include/view.h
@@ -1,4 +1,24 @@
-#ifndef VIEW_H
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
+#ifndef VIEW_H
 #define VIEW_H
 
 #include <QFrame>
@@ -37,8 +57,8 @@ signals:
     void mouseRightDoubleClick(QPointF pos, int direction);
     void mouseMiddleDoubleClick(int direction);
     void mouseShiftWheel(int delta);
-    void colorSelected(QPoint p, GraphicsView* graphicsView);
-    void setColorEvent(QPoint p, GraphicsView* graphicsView);
+    void colorSelected();
+    void setColorEvent();
     //void mouseRightClick(QPointF pos);
 };
 
diff --git a/include/whitebalance.h b/include/whitebalance.h
deleted file mode 100644
index 5a0f32a9c7eba4cb36e0012e678a3fa62671d020..0000000000000000000000000000000000000000
--- a/include/whitebalance.h
+++ /dev/null
@@ -1,571 +0,0 @@
-/* ============================================================
- *
- * This file is a part of digiKam project
- * http://www.digikam.org
- *
- * Date        : 2007-16-01
- * Description : white balance color correction.
- *
- * Copyright (C) 2007 by Gilles Caulier <caulier dot gilles at gmail dot com>
- *
- * This program is free software; you can redistribute it
- * and/or modify it under the terms of the GNU General
- * Public License as published by the Free Software Foundation;
- * either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * ============================================================ */
-
-#ifndef WHITEBALANCE_H
-#define WHITEBALANCE_H
-
-// Digikam includes.
-
-//#include "digikam_export.h"
-#include "helper.h"
-
-class QColor;
-
-static const float blackBodyWhiteBalance[][3] =
-{
-    /*    2000 */ { 1.0000, 0.5977, 0.0120 },
-    /*    2010 */ { 1.0000, 0.6021, 0.0140 },
-    /*    2020 */ { 1.0000, 0.6064, 0.0160 },
-    /*    2030 */ { 1.0000, 0.6107, 0.0181 },
-    /*    2040 */ { 1.0000, 0.6150, 0.0202 },
-    /*    2050 */ { 1.0000, 0.6193, 0.0223 },
-    /*    2060 */ { 1.0000, 0.6236, 0.0244 },
-    /*    2070 */ { 1.0000, 0.6278, 0.0265 },
-    /*    2080 */ { 1.0000, 0.6320, 0.0287 },
-    /*    2090 */ { 1.0000, 0.6362, 0.0309 },
-    /*    2100 */ { 1.0000, 0.6403, 0.0331 },
-    /*    2110 */ { 1.0000, 0.6444, 0.0353 },
-    /*    2120 */ { 1.0000, 0.6485, 0.0375 },
-    /*    2130 */ { 1.0000, 0.6526, 0.0398 },
-    /*    2140 */ { 1.0000, 0.6566, 0.0421 },
-    /*    2150 */ { 1.0000, 0.6606, 0.0444 },
-    /*    2160 */ { 1.0000, 0.6646, 0.0467 },
-    /*    2170 */ { 1.0000, 0.6686, 0.0491 },
-    /*    2180 */ { 1.0000, 0.6725, 0.0514 },
-    /*    2190 */ { 1.0000, 0.6764, 0.0538 },
-    /*    2200 */ { 1.0000, 0.6803, 0.0562 },
-    /*    2210 */ { 1.0000, 0.6842, 0.0586 },
-    /*    2220 */ { 1.0000, 0.6880, 0.0611 },
-    /*    2230 */ { 1.0000, 0.6918, 0.0635 },
-    /*    2240 */ { 1.0000, 0.6956, 0.0660 },
-    /*    2250 */ { 1.0000, 0.6994, 0.0685 },
-    /*    2260 */ { 1.0000, 0.7031, 0.0710 },
-    /*    2270 */ { 1.0000, 0.7068, 0.0735 },
-    /*    2280 */ { 1.0000, 0.7105, 0.0761 },
-    /*    2290 */ { 1.0000, 0.7142, 0.0786 },
-    /*    2300 */ { 1.0000, 0.7178, 0.0812 },
-    /*    2310 */ { 1.0000, 0.7214, 0.0838 },
-    /*    2320 */ { 1.0000, 0.7250, 0.0864 },
-    /*    2330 */ { 1.0000, 0.7286, 0.0890 },
-    /*    2340 */ { 1.0000, 0.7321, 0.0917 },
-    /*    2350 */ { 1.0000, 0.7356, 0.0943 },
-    /*    2360 */ { 1.0000, 0.7391, 0.0970 },
-    /*    2370 */ { 1.0000, 0.7426, 0.0997 },
-    /*    2380 */ { 1.0000, 0.7461, 0.1024 },
-    /*    2390 */ { 1.0000, 0.7495, 0.1051 },
-    /*    2400 */ { 1.0000, 0.7529, 0.1079 },
-    /*    2410 */ { 1.0000, 0.7563, 0.1106 },
-    /*    2420 */ { 1.0000, 0.7596, 0.1134 },
-    /*    2430 */ { 1.0000, 0.7630, 0.1162 },
-    /*    2440 */ { 1.0000, 0.7663, 0.1189 },
-    /*    2450 */ { 1.0000, 0.7696, 0.1217 },
-    /*    2460 */ { 1.0000, 0.7728, 0.1246 },
-    /*    2470 */ { 1.0000, 0.7761, 0.1274 },
-    /*    2480 */ { 1.0000, 0.7793, 0.1302 },
-    /*    2490 */ { 1.0000, 0.7825, 0.1331 },
-    /*    2500 */ { 1.0000, 0.7857, 0.1360 },
-    /*    2510 */ { 1.0000, 0.7889, 0.1388 },
-    /*    2520 */ { 1.0000, 0.7920, 0.1417 },
-    /*    2530 */ { 1.0000, 0.7951, 0.1446 },
-    /*    2540 */ { 1.0000, 0.7982, 0.1476 },
-    /*    2550 */ { 1.0000, 0.8013, 0.1505 },
-    /*    2560 */ { 1.0000, 0.8043, 0.1534 },
-    /*    2570 */ { 1.0000, 0.8074, 0.1564 },
-    /*    2580 */ { 1.0000, 0.8104, 0.1593 },
-    /*    2590 */ { 1.0000, 0.8134, 0.1623 },
-    /*    2600 */ { 1.0000, 0.8163, 0.1653 },
-    /*    2610 */ { 1.0000, 0.8193, 0.1683 },
-    /*    2620 */ { 1.0000, 0.8222, 0.1713 },
-    /*    2630 */ { 1.0000, 0.8251, 0.1743 },
-    /*    2640 */ { 1.0000, 0.8280, 0.1773 },
-    /*    2650 */ { 1.0000, 0.8309, 0.1804 },
-    /*    2660 */ { 1.0000, 0.8337, 0.1834 },
-    /*    2670 */ { 1.0000, 0.8365, 0.1865 },
-    /*    2680 */ { 1.0000, 0.8393, 0.1895 },
-    /*    2690 */ { 1.0000, 0.8421, 0.1926 },
-    /*    2700 */ { 1.0000, 0.8449, 0.1957 },
-    /*    2710 */ { 1.0000, 0.8476, 0.1988 },
-    /*    2720 */ { 1.0000, 0.8504, 0.2019 },
-    /*    2730 */ { 1.0000, 0.8531, 0.2050 },
-    /*    2740 */ { 1.0000, 0.8558, 0.2081 },
-    /*    2750 */ { 1.0000, 0.8585, 0.2112 },
-    /*    2760 */ { 1.0000, 0.8611, 0.2144 },
-    /*    2770 */ { 1.0000, 0.8637, 0.2175 },
-    /*    2780 */ { 1.0000, 0.8664, 0.2206 },
-    /*    2790 */ { 1.0000, 0.8690, 0.2238 },
-    /*    2800 */ { 1.0000, 0.8715, 0.2269 },
-    /*    2810 */ { 1.0000, 0.8741, 0.2301 },
-    /*    2820 */ { 1.0000, 0.8766, 0.2333 },
-    /*    2830 */ { 1.0000, 0.8792, 0.2365 },
-    /*    2840 */ { 1.0000, 0.8817, 0.2397 },
-    /*    2850 */ { 1.0000, 0.8842, 0.2429 },
-    /*    2860 */ { 1.0000, 0.8866, 0.2461 },
-    /*    2870 */ { 1.0000, 0.8891, 0.2493 },
-    /*    2880 */ { 1.0000, 0.8915, 0.2525 },
-    /*    2890 */ { 1.0000, 0.8940, 0.2557 },
-    /*    2900 */ { 1.0000, 0.8964, 0.2589 },
-    /*    2910 */ { 1.0000, 0.8987, 0.2621 },
-    /*    2920 */ { 1.0000, 0.9011, 0.2654 },
-    /*    2930 */ { 1.0000, 0.9035, 0.2686 },
-    /*    2940 */ { 1.0000, 0.9058, 0.2719 },
-    /*    2950 */ { 1.0000, 0.9081, 0.2751 },
-    /*    2960 */ { 1.0000, 0.9104, 0.2784 },
-    /*    2970 */ { 1.0000, 0.9127, 0.2816 },
-    /*    2980 */ { 1.0000, 0.9150, 0.2849 },
-    /*    2990 */ { 1.0000, 0.9172, 0.2882 },
-    /*    3000 */ { 1.0000, 0.9195, 0.2914 },
-    /*    3010 */ { 1.0000, 0.9217, 0.2947 },
-    /*    3020 */ { 1.0000, 0.9239, 0.2980 },
-    /*    3030 */ { 1.0000, 0.9261, 0.3013 },
-    /*    3040 */ { 1.0000, 0.9283, 0.3046 },
-    /*    3050 */ { 1.0000, 0.9304, 0.3079 },
-    /*    3060 */ { 1.0000, 0.9326, 0.3112 },
-    /*    3070 */ { 1.0000, 0.9347, 0.3145 },
-    /*    3080 */ { 1.0000, 0.9368, 0.3178 },
-    /*    3090 */ { 1.0000, 0.9389, 0.3211 },
-    /*    3100 */ { 1.0000, 0.9410, 0.3244 },
-    /*    3110 */ { 1.0000, 0.9430, 0.3277 },
-    /*    3120 */ { 1.0000, 0.9451, 0.3310 },
-    /*    3130 */ { 1.0000, 0.9471, 0.3343 },
-    /*    3140 */ { 1.0000, 0.9492, 0.3376 },
-    /*    3150 */ { 1.0000, 0.9512, 0.3410 },
-    /*    3160 */ { 1.0000, 0.9532, 0.3443 },
-    /*    3170 */ { 1.0000, 0.9551, 0.3476 },
-    /*    3180 */ { 1.0000, 0.9571, 0.3509 },
-    /*    3190 */ { 1.0000, 0.9590, 0.3543 },
-    /*    3200 */ { 1.0000, 0.9610, 0.3576 },
-    /*    3210 */ { 1.0000, 0.9629, 0.3609 },
-    /*    3220 */ { 1.0000, 0.9648, 0.3643 },
-    /*    3230 */ { 1.0000, 0.9667, 0.3676 },
-    /*    3240 */ { 1.0000, 0.9686, 0.3709 },
-    /*    3250 */ { 1.0000, 0.9705, 0.3743 },
-    /*    3260 */ { 1.0000, 0.9723, 0.3776 },
-    /*    3270 */ { 1.0000, 0.9741, 0.3810 },
-    /*    3280 */ { 1.0000, 0.9760, 0.3843 },
-    /*    3290 */ { 1.0000, 0.9778, 0.3876 },
-    /*    3300 */ { 1.0000, 0.9796, 0.3910 },
-    /*    3310 */ { 1.0000, 0.9814, 0.3943 },
-    /*    3320 */ { 1.0000, 0.9831, 0.3977 },
-    /*    3330 */ { 1.0000, 0.9849, 0.4010 },
-    /*    3340 */ { 1.0000, 0.9867, 0.4044 },
-    /*    3350 */ { 1.0000, 0.9884, 0.4077 },
-    /*    3360 */ { 1.0000, 0.9901, 0.4111 },
-    /*    3370 */ { 1.0000, 0.9918, 0.4144 },
-    /*    3380 */ { 1.0000, 0.9935, 0.4177 },
-    /*    3390 */ { 1.0000, 0.9952, 0.4211 },
-    /*    3400 */ { 1.0000, 0.9969, 0.4244 },
-    /*    3410 */ { 1.0000, 0.9985, 0.4278 },
-    /*    3420 */ { 1.0000, 1.0000, 0.4311 },
-    /*    3430 */ { 1.0000, 1.0000, 0.4345 },
-    /*    3440 */ { 1.0000, 1.0000, 0.4378 },
-    /*    3450 */ { 1.0000, 1.0000, 0.4412 },
-    /*    3460 */ { 1.0000, 1.0000, 0.4445 },
-    /*    3470 */ { 1.0000, 1.0000, 0.4479 },
-    /*    3480 */ { 0.9992, 1.0000, 0.4512 },
-    /*    3490 */ { 0.9977, 1.0000, 0.4545 },
-    /*    3500 */ { 0.9962, 1.0000, 0.4579 },
-    /*    3510 */ { 0.9947, 1.0000, 0.4612 },
-    /*    3520 */ { 0.9932, 1.0000, 0.4646 },
-    /*    3530 */ { 0.9918, 1.0000, 0.4679 },
-    /*    3540 */ { 0.9903, 1.0000, 0.4712 },
-    /*    3550 */ { 0.9888, 1.0000, 0.4746 },
-    /*    3560 */ { 0.9874, 1.0000, 0.4779 },
-    /*    3570 */ { 0.9859, 1.0000, 0.4812 },
-    /*    3580 */ { 0.9845, 1.0000, 0.4846 },
-    /*    3590 */ { 0.9830, 1.0000, 0.4879 },
-    /*    3600 */ { 0.9816, 1.0000, 0.4912 },
-    /*    3610 */ { 0.9802, 1.0000, 0.4945 },
-    /*    3620 */ { 0.9788, 1.0000, 0.4979 },
-    /*    3630 */ { 0.9773, 1.0000, 0.5012 },
-    /*    3640 */ { 0.9759, 1.0000, 0.5045 },
-    /*    3650 */ { 0.9745, 1.0000, 0.5078 },
-    /*    3660 */ { 0.9731, 1.0000, 0.5111 },
-    /*    3670 */ { 0.9717, 1.0000, 0.5144 },
-    /*    3680 */ { 0.9703, 1.0000, 0.5178 },
-    /*    3690 */ { 0.9689, 1.0000, 0.5211 },
-    /*    3700 */ { 0.9676, 1.0000, 0.5244 },
-    /*    3710 */ { 0.9662, 1.0000, 0.5277 },
-    /*    3720 */ { 0.9648, 1.0000, 0.5310 },
-    /*    3730 */ { 0.9634, 1.0000, 0.5343 },
-    /*    3740 */ { 0.9621, 1.0000, 0.5376 },
-    /*    3750 */ { 0.9607, 1.0000, 0.5409 },
-    /*    3760 */ { 0.9594, 1.0000, 0.5442 },
-    /*    3770 */ { 0.9580, 1.0000, 0.5474 },
-    /*    3780 */ { 0.9567, 1.0000, 0.5507 },
-    /*    3790 */ { 0.9553, 1.0000, 0.5540 },
-    /*    3800 */ { 0.9540, 1.0000, 0.5573 },
-    /*    3810 */ { 0.9527, 1.0000, 0.5606 },
-    /*    3820 */ { 0.9514, 1.0000, 0.5638 },
-    /*    3830 */ { 0.9500, 1.0000, 0.5671 },
-    /*    3840 */ { 0.9487, 1.0000, 0.5704 },
-    /*    3850 */ { 0.9474, 1.0000, 0.5736 },
-    /*    3860 */ { 0.9461, 1.0000, 0.5769 },
-    /*    3870 */ { 0.9448, 1.0000, 0.5802 },
-    /*    3880 */ { 0.9435, 1.0000, 0.5834 },
-    /*    3890 */ { 0.9422, 1.0000, 0.5867 },
-    /*    3900 */ { 0.9409, 1.0000, 0.5899 },
-    /*    3910 */ { 0.9397, 1.0000, 0.5932 },
-    /*    3920 */ { 0.9384, 1.0000, 0.5964 },
-    /*    3930 */ { 0.9371, 1.0000, 0.5996 },
-    /*    3940 */ { 0.9358, 1.0000, 0.6029 },
-    /*    3950 */ { 0.9346, 1.0000, 0.6061 },
-    /*    3960 */ { 0.9333, 1.0000, 0.6093 },
-    /*    3970 */ { 0.9321, 1.0000, 0.6126 },
-    /*    3980 */ { 0.9308, 1.0000, 0.6158 },
-    /*    3990 */ { 0.9296, 1.0000, 0.6190 },
-    /*    4000 */ { 0.9283, 1.0000, 0.6222 },
-    /*    4010 */ { 0.9271, 1.0000, 0.6254 },
-    /*    4020 */ { 0.9259, 1.0000, 0.6286 },
-    /*    4030 */ { 0.9247, 1.0000, 0.6318 },
-    /*    4040 */ { 0.9234, 1.0000, 0.6350 },
-    /*    4050 */ { 0.9222, 1.0000, 0.6382 },
-    /*    4060 */ { 0.9210, 1.0000, 0.6414 },
-    /*    4070 */ { 0.9198, 1.0000, 0.6446 },
-    /*    4080 */ { 0.9186, 1.0000, 0.6478 },
-    /*    4090 */ { 0.9174, 1.0000, 0.6509 },
-    /*    4100 */ { 0.9162, 1.0000, 0.6541 },
-    /*    4110 */ { 0.9150, 1.0000, 0.6573 },
-    /*    4120 */ { 0.9138, 1.0000, 0.6605 },
-    /*    4130 */ { 0.9126, 1.0000, 0.6636 },
-    /*    4140 */ { 0.9115, 1.0000, 0.6668 },
-    /*    4150 */ { 0.9103, 1.0000, 0.6699 },
-    /*    4160 */ { 0.9091, 1.0000, 0.6731 },
-    /*    4170 */ { 0.9080, 1.0000, 0.6762 },
-    /*    4180 */ { 0.9068, 1.0000, 0.6794 },
-    /*    4190 */ { 0.9056, 1.0000, 0.6825 },
-    /*    4200 */ { 0.9045, 1.0000, 0.6856 },
-    /*    4210 */ { 0.9033, 1.0000, 0.6887 },
-    /*    4220 */ { 0.9022, 1.0000, 0.6919 },
-    /*    4230 */ { 0.9011, 1.0000, 0.6950 },
-    /*    4240 */ { 0.8999, 1.0000, 0.6981 },
-    /*    4250 */ { 0.8988, 1.0000, 0.7012 },
-    /*    4260 */ { 0.8974, 1.0000, 0.7041 },
-    /*    4270 */ { 0.8960, 1.0000, 0.7070 },
-    /*    4280 */ { 0.8946, 1.0000, 0.7098 },
-    /*    4290 */ { 0.8932, 1.0000, 0.7127 },
-    /*    4300 */ { 0.8918, 1.0000, 0.7155 },
-    /*    4310 */ { 0.8904, 1.0000, 0.7184 },
-    /*    4320 */ { 0.8890, 1.0000, 0.7212 },
-    /*    4330 */ { 0.8876, 1.0000, 0.7240 },
-    /*    4340 */ { 0.8862, 1.0000, 0.7269 },
-    /*    4350 */ { 0.8849, 1.0000, 0.7297 },
-    /*    4360 */ { 0.8835, 1.0000, 0.7325 },
-    /*    4370 */ { 0.8821, 1.0000, 0.7353 },
-    /*    4380 */ { 0.8808, 1.0000, 0.7381 },
-    /*    4390 */ { 0.8795, 1.0000, 0.7409 },
-    /*    4400 */ { 0.8781, 1.0000, 0.7437 },
-    /*    4410 */ { 0.8768, 1.0000, 0.7465 },
-    /*    4420 */ { 0.8755, 1.0000, 0.7493 },
-    /*    4430 */ { 0.8742, 1.0000, 0.7521 },
-    /*    4440 */ { 0.8729, 1.0000, 0.7549 },
-    /*    4450 */ { 0.8716, 1.0000, 0.7576 },
-    /*    4460 */ { 0.8703, 1.0000, 0.7604 },
-    /*    4470 */ { 0.8690, 1.0000, 0.7632 },
-    /*    4480 */ { 0.8677, 1.0000, 0.7659 },
-    /*    4490 */ { 0.8664, 1.0000, 0.7687 },
-    /*    4500 */ { 0.8652, 1.0000, 0.7714 },
-    /*    4510 */ { 0.8639, 1.0000, 0.7742 },
-    /*    4520 */ { 0.8627, 1.0000, 0.7769 },
-    /*    4530 */ { 0.8614, 1.0000, 0.7797 },
-    /*    4540 */ { 0.8602, 1.0000, 0.7824 },
-    /*    4550 */ { 0.8589, 1.0000, 0.7851 },
-    /*    4560 */ { 0.8577, 1.0000, 0.7879 },
-    /*    4570 */ { 0.8565, 1.0000, 0.7906 },
-    /*    4580 */ { 0.8553, 1.0000, 0.7933 },
-    /*    4590 */ { 0.8541, 1.0000, 0.7960 },
-    /*    4600 */ { 0.8529, 1.0000, 0.7987 },
-    /*    4610 */ { 0.8517, 1.0000, 0.8014 },
-    /*    4620 */ { 0.8505, 1.0000, 0.8041 },
-    /*    4630 */ { 0.8493, 1.0000, 0.8068 },
-    /*    4640 */ { 0.8481, 1.0000, 0.8095 },
-    /*    4650 */ { 0.8469, 1.0000, 0.8122 },
-    /*    4660 */ { 0.8458, 1.0000, 0.8148 },
-    /*    4670 */ { 0.8446, 1.0000, 0.8175 },
-    /*    4680 */ { 0.8434, 1.0000, 0.8202 },
-    /*    4690 */ { 0.8423, 1.0000, 0.8228 },
-    /*    4700 */ { 0.8411, 1.0000, 0.8255 },
-    /*    4710 */ { 0.8400, 1.0000, 0.8282 },
-    /*    4720 */ { 0.8389, 1.0000, 0.8308 },
-    /*    4730 */ { 0.8377, 1.0000, 0.8335 },
-    /*    4740 */ { 0.8366, 1.0000, 0.8361 },
-    /*    4750 */ { 0.8355, 1.0000, 0.8387 },
-    /*    4760 */ { 0.8344, 1.0000, 0.8414 },
-    /*    4770 */ { 0.8333, 1.0000, 0.8440 },
-    /*    4780 */ { 0.8322, 1.0000, 0.8466 },
-    /*    4790 */ { 0.8311, 1.0000, 0.8492 },
-    /*    4800 */ { 0.8300, 1.0000, 0.8518 },
-    /*    4810 */ { 0.8289, 1.0000, 0.8544 },
-    /*    4820 */ { 0.8278, 1.0000, 0.8570 },
-    /*    4830 */ { 0.8268, 1.0000, 0.8596 },
-    /*    4840 */ { 0.8257, 1.0000, 0.8622 },
-    /*    4850 */ { 0.8246, 1.0000, 0.8648 },
-    /*    4860 */ { 0.8236, 1.0000, 0.8674 },
-    /*    4870 */ { 0.8225, 1.0000, 0.8700 },
-    /*    4880 */ { 0.8215, 1.0000, 0.8725 },
-    /*    4890 */ { 0.8204, 1.0000, 0.8751 },
-    /*    4900 */ { 0.8194, 1.0000, 0.8777 },
-    /*    4910 */ { 0.8183, 1.0000, 0.8802 },
-    /*    4920 */ { 0.8173, 1.0000, 0.8828 },
-    /*    4930 */ { 0.8163, 1.0000, 0.8853 },
-    /*    4940 */ { 0.8153, 1.0000, 0.8879 },
-    /*    4950 */ { 0.8143, 1.0000, 0.8904 },
-    /*    4960 */ { 0.8132, 1.0000, 0.8930 },
-    /*    4970 */ { 0.8122, 1.0000, 0.8955 },
-    /*    4980 */ { 0.8112, 1.0000, 0.8980 },
-    /*    4990 */ { 0.8102, 1.0000, 0.9005 },
-    /*    5000 */ { 0.8093, 1.0000, 0.9031 },
-    /*    5010 */ { 0.8083, 1.0000, 0.9056 },
-    /*    5020 */ { 0.8073, 1.0000, 0.9081 },
-    /*    5030 */ { 0.8063, 1.0000, 0.9106 },
-    /*    5040 */ { 0.8053, 1.0000, 0.9131 },
-    /*    5050 */ { 0.8044, 1.0000, 0.9156 },
-    /*    5060 */ { 0.8034, 1.0000, 0.9181 },
-    /*    5070 */ { 0.8024, 1.0000, 0.9206 },
-    /*    5080 */ { 0.8015, 1.0000, 0.9230 },
-    /*    5090 */ { 0.8005, 1.0000, 0.9255 },
-    /*    5100 */ { 0.7996, 1.0000, 0.9280 },
-    /*    5110 */ { 0.7986, 1.0000, 0.9305 },
-    /*    5120 */ { 0.7977, 1.0000, 0.9329 },
-    /*    5130 */ { 0.7968, 1.0000, 0.9354 },
-    /*    5140 */ { 0.7958, 1.0000, 0.9378 },
-    /*    5150 */ { 0.7949, 1.0000, 0.9403 },
-    /*    5160 */ { 0.7940, 1.0000, 0.9427 },
-    /*    5170 */ { 0.7931, 1.0000, 0.9452 },
-    /*    5180 */ { 0.7922, 1.0000, 0.9476 },
-    /*    5190 */ { 0.7913, 1.0000, 0.9500 },
-    /*    5200 */ { 0.7904, 1.0000, 0.9524 },
-    /*    5210 */ { 0.7895, 1.0000, 0.9549 },
-    /*    5220 */ { 0.7886, 1.0000, 0.9573 },
-    /*    5230 */ { 0.7877, 1.0000, 0.9597 },
-    /*    5240 */ { 0.7868, 1.0000, 0.9621 },
-    /*    5250 */ { 0.7859, 1.0000, 0.9645 },
-    /*    5260 */ { 0.7850, 1.0000, 0.9669 },
-    /*    5270 */ { 0.7841, 1.0000, 0.9693 },
-    /*    5280 */ { 0.7833, 1.0000, 0.9717 },
-    /*    5290 */ { 0.7824, 1.0000, 0.9741 },
-    /*    5300 */ { 0.7815, 1.0000, 0.9764 },
-    /*    5310 */ { 0.7807, 1.0000, 0.9788 },
-    /*    5320 */ { 0.7798, 1.0000, 0.9812 },
-    /*    5330 */ { 0.7790, 1.0000, 0.9835 },
-    /*    5340 */ { 0.7781, 1.0000, 0.9859 },
-    /*    5350 */ { 0.7773, 1.0000, 0.9883 },
-    /*    5360 */ { 0.7764, 1.0000, 0.9906 },
-    /*    5370 */ { 0.7756, 1.0000, 0.9930 },
-    /*    5380 */ { 0.7748, 1.0000, 0.9953 },
-    /*    5390 */ { 0.7739, 1.0000, 0.9976 },
-    /*    5400 */ { 0.7731, 1.0000, 1.0000 },
-    /*    5410 */ { 0.7723, 1.0000, 1.0000 },
-    /*    5420 */ { 0.7715, 1.0000, 1.0000 },
-    /*    5430 */ { 0.7706, 1.0000, 1.0000 },
-    /*    5440 */ { 0.7698, 1.0000, 1.0000 },
-    /*    5450 */ { 0.7690, 1.0000, 1.0000 },
-    /*    5460 */ { 0.7682, 1.0000, 1.0000 },
-    /*    5470 */ { 0.7674, 1.0000, 1.0000 },
-    /*    5480 */ { 0.7666, 1.0000, 1.0000 },
-    /*    5490 */ { 0.7658, 1.0000, 1.0000 },
-    /*    5500 */ { 0.7650, 1.0000, 1.0000 },
-    /*    5510 */ { 0.7642, 1.0000, 1.0000 },
-    /*    5520 */ { 0.7634, 1.0000, 1.0000 },
-    /*    5530 */ { 0.7627, 1.0000, 1.0000 },
-    /*    5540 */ { 0.7619, 1.0000, 1.0000 },
-    /*    5550 */ { 0.7611, 1.0000, 1.0000 },
-    /*    5560 */ { 0.7603, 1.0000, 1.0000 },
-    /*    5570 */ { 0.7596, 1.0000, 1.0000 },
-    /*    5580 */ { 0.7588, 1.0000, 1.0000 },
-    /*    5590 */ { 0.7580, 1.0000, 1.0000 },
-    /*    5600 */ { 0.7573, 1.0000, 1.0000 },
-    /*    5610 */ { 0.7565, 1.0000, 1.0000 },
-    /*    5620 */ { 0.7558, 1.0000, 1.0000 },
-    /*    5630 */ { 0.7550, 1.0000, 1.0000 },
-    /*    5640 */ { 0.7543, 1.0000, 1.0000 },
-    /*    5650 */ { 0.7535, 1.0000, 1.0000 },
-    /*    5660 */ { 0.7528, 1.0000, 1.0000 },
-    /*    5670 */ { 0.7521, 1.0000, 1.0000 },
-    /*    5680 */ { 0.7513, 1.0000, 1.0000 },
-    /*    5690 */ { 0.7506, 1.0000, 1.0000 },
-    /*    5700 */ { 0.7499, 1.0000, 1.0000 },
-    /*    5710 */ { 0.7492, 1.0000, 1.0000 },
-    /*    5720 */ { 0.7484, 1.0000, 1.0000 },
-    /*    5730 */ { 0.7477, 1.0000, 1.0000 },
-    /*    5740 */ { 0.7470, 1.0000, 1.0000 },
-    /*    5750 */ { 0.7456, 1.0000, 1.0000 },
-    /*    5760 */ { 0.7436, 1.0000, 1.0000 },
-    /*    5770 */ { 0.7416, 1.0000, 1.0000 },
-    /*    5780 */ { 0.7396, 1.0000, 1.0000 },
-    /*    5790 */ { 0.7377, 1.0000, 1.0000 },
-    /*    5800 */ { 0.7358, 1.0000, 1.0000 },
-    /*    5810 */ { 0.7338, 1.0000, 1.0000 },
-    /*    5820 */ { 0.7319, 1.0000, 1.0000 },
-    /*    5830 */ { 0.7300, 1.0000, 1.0000 },
-    /*    5840 */ { 0.7281, 1.0000, 1.0000 },
-    /*    5850 */ { 0.7263, 1.0000, 1.0000 },
-    /*    5860 */ { 0.7244, 1.0000, 1.0000 },
-    /*    5870 */ { 0.7225, 1.0000, 1.0000 },
-    /*    5880 */ { 0.7207, 1.0000, 1.0000 },
-    /*    5890 */ { 0.7189, 1.0000, 1.0000 },
-    /*    5900 */ { 0.7170, 1.0000, 1.0000 },
-    /*    5910 */ { 0.7152, 1.0000, 1.0000 },
-    /*    5920 */ { 0.7134, 1.0000, 1.0000 },
-    /*    5930 */ { 0.7116, 1.0000, 1.0000 },
-    /*    5940 */ { 0.7099, 1.0000, 1.0000 },
-    /*    5950 */ { 0.7081, 1.0000, 1.0000 },
-    /*    5960 */ { 0.7063, 1.0000, 1.0000 },
-    /*    5970 */ { 0.7046, 1.0000, 1.0000 },
-    /*    5980 */ { 0.7029, 1.0000, 1.0000 },
-    /*    5990 */ { 0.7011, 1.0000, 1.0000 },
-    /*    6000 */ { 0.6994, 1.0000, 1.0000 },
-    /*    6010 */ { 0.6977, 1.0000, 1.0000 },
-    /*    6020 */ { 0.6960, 1.0000, 1.0000 },
-    /*    6030 */ { 0.6943, 1.0000, 1.0000 },
-    /*    6040 */ { 0.6926, 1.0000, 1.0000 },
-    /*    6050 */ { 0.6910, 1.0000, 1.0000 },
-    /*    6060 */ { 0.6893, 1.0000, 1.0000 },
-    /*    6070 */ { 0.6877, 1.0000, 1.0000 },
-    /*    6080 */ { 0.6860, 1.0000, 1.0000 },
-    /*    6090 */ { 0.6844, 1.0000, 1.0000 },
-    /*    6100 */ { 0.6828, 1.0000, 1.0000 },
-    /*    6110 */ { 0.6812, 1.0000, 1.0000 },
-    /*    6120 */ { 0.6796, 1.0000, 1.0000 },
-    /*    6130 */ { 0.6780, 1.0000, 1.0000 },
-    /*    6140 */ { 0.6764, 1.0000, 1.0000 },
-    /*    6150 */ { 0.6748, 1.0000, 1.0000 },
-    /*    6160 */ { 0.6733, 1.0000, 1.0000 },
-    /*    6170 */ { 0.6717, 1.0000, 1.0000 },
-    /*    6180 */ { 0.6702, 1.0000, 1.0000 },
-    /*    6190 */ { 0.6686, 1.0000, 1.0000 },
-    /*    6200 */ { 0.6671, 1.0000, 1.0000 },
-    /*    6210 */ { 0.6656, 1.0000, 1.0000 },
-    /*    6220 */ { 0.6641, 1.0000, 1.0000 },
-    /*    6230 */ { 0.6626, 1.0000, 1.0000 },
-    /*    6240 */ { 0.6611, 1.0000, 1.0000 },
-    /*    6250 */ { 0.6596, 1.0000, 1.0000 },
-    /*    6260 */ { 0.6581, 1.0000, 1.0000 },
-    /*    6270 */ { 0.6566, 1.0000, 1.0000 },
-    /*    6280 */ { 0.6552, 1.0000, 1.0000 },
-    /*    6290 */ { 0.6537, 1.0000, 1.0000 },
-    /*    6300 */ { 0.6523, 1.0000, 1.0000 },
-    /*    6310 */ { 0.6508, 1.0000, 1.0000 },
-    /*    6320 */ { 0.6494, 1.0000, 1.0000 },
-    /*    6330 */ { 0.6480, 1.0000, 1.0000 },
-    /*    6340 */ { 0.6465, 1.0000, 1.0000 },
-    /*    6350 */ { 0.6451, 1.0000, 1.0000 },
-    /*    6360 */ { 0.6437, 1.0000, 1.0000 },
-    /*    6370 */ { 0.6423, 1.0000, 1.0000 },
-    /*    6380 */ { 0.6410, 1.0000, 1.0000 },
-    /*    6390 */ { 0.6396, 1.0000, 1.0000 },
-    /*    6400 */ { 0.6382, 1.0000, 1.0000 },
-    /*    6410 */ { 0.6368, 1.0000, 1.0000 },
-    /*    6420 */ { 0.6355, 1.0000, 1.0000 },
-    /*    6430 */ { 0.6341, 1.0000, 1.0000 },
-    /*    6440 */ { 0.6328, 1.0000, 1.0000 },
-    /*    6450 */ { 0.6315, 1.0000, 1.0000 },
-    /*    6460 */ { 0.6301, 1.0000, 1.0000 },
-    /*    6470 */ { 0.6288, 1.0000, 1.0000 },
-    /*    6480 */ { 0.6275, 1.0000, 1.0000 },
-    /*    6490 */ { 0.6262, 1.0000, 1.0000 },
-    /*    6500 */ { 0.6249, 1.0000, 1.0000 },
-    /*    6510 */ { 0.6236, 1.0000, 1.0000 },
-    /*    6520 */ { 0.6223, 1.0000, 1.0000 },
-    /*    6530 */ { 0.6210, 1.0000, 1.0000 },
-    /*    6540 */ { 0.6198, 1.0000, 1.0000 },
-    /*    6550 */ { 0.6185, 1.0000, 1.0000 },
-    /*    6560 */ { 0.6173, 1.0000, 1.0000 },
-    /*    6570 */ { 0.6160, 1.0000, 1.0000 },
-    /*    6580 */ { 0.6148, 1.0000, 1.0000 },
-    /*    6590 */ { 0.6135, 1.0000, 1.0000 },
-    /*    6600 */ { 0.6123, 1.0000, 1.0000 },
-    /*    6610 */ { 0.6111, 1.0000, 1.0000 },
-    /*    6620 */ { 0.6098, 1.0000, 1.0000 },
-    /*    6630 */ { 0.6086, 1.0000, 1.0000 },
-    /*    6640 */ { 0.6074, 1.0000, 1.0000 },
-    /*    6650 */ { 0.6062, 1.0000, 1.0000 },
-    /*    6660 */ { 0.6050, 1.0000, 1.0000 },
-    /*    6670 */ { 0.6038, 1.0000, 1.0000 },
-    /*    6680 */ { 0.6026, 1.0000, 1.0000 },
-    /*    6690 */ { 0.6015, 1.0000, 1.0000 },
-    /*    6700 */ { 0.6003, 1.0000, 1.0000 },
-    /*    6710 */ { 0.5991, 1.0000, 1.0000 },
-    /*    6720 */ { 0.5980, 1.0000, 1.0000 },
-    /*    6730 */ { 0.5968, 1.0000, 1.0000 },
-    /*    6740 */ { 0.5957, 1.0000, 1.0000 },
-    /*    6750 */ { 0.5945, 1.0000, 1.0000 },
-    /*    6760 */ { 0.5934, 1.0000, 1.0000 },
-    /*    6770 */ { 0.5923, 1.0000, 1.0000 },
-    /*    6780 */ { 0.5911, 1.0000, 1.0000 },
-    /*    6790 */ { 0.5900, 0.9992, 1.0000 },
-    /*    6800 */ { 0.5889, 0.9981, 1.0000 },
-    /*    6810 */ { 0.5878, 0.9970, 1.0000 },
-    /*    6820 */ { 0.5867, 0.9959, 1.0000 },
-    /*    6830 */ { 0.5856, 0.9948, 1.0000 },
-    /*    6840 */ { 0.5845, 0.9937, 1.0000 },
-    /*    6850 */ { 0.5834, 0.9926, 1.0000 },
-    /*    6860 */ { 0.5823, 0.9915, 1.0000 },
-    /*    6870 */ { 0.5813, 0.9904, 1.0000 },
-    /*    6880 */ { 0.5802, 0.9893, 1.0000 },
-    /*    6890 */ { 0.5791, 0.9882, 1.0000 },
-    /*    6900 */ { 0.5781, 0.9871, 1.0000 },
-    /*    6910 */ { 0.5770, 0.9861, 1.0000 },
-    /*    6920 */ { 0.5760, 0.9850, 1.0000 },
-    /*    6930 */ { 0.5749, 0.9839, 1.0000 },
-    /*    6940 */ { 0.5739, 0.9829, 1.0000 },
-    /*    6950 */ { 0.5728, 0.9818, 1.0000 },
-    /*    6960 */ { 0.5718, 0.9808, 1.0000 },
-    /*    6970 */ { 0.5708, 0.9797, 1.0000 },
-    /*    6980 */ { 0.5698, 0.9787, 1.0000 },
-    /*    6990 */ { 0.5687, 0.9776, 1.0000 },
-    /*    7000 */ { 0.5677, 0.9766, 1.0000 },
-};
-
-class WhiteBalancePriv;
-
-class WhiteBalance
-{
-
-public:
-
-    WhiteBalance(bool sixteenBit);
-    ~WhiteBalance();
-
-    void whiteBalance(uchar *data, int width, int height, bool sixteenBit,
-                      double black=0.0, double exposition=0.0,
-                      double temperature=4.750, double green=1.2, double dark=0.5,
-                      double gamma=1.0, double saturation=1.0);
-
-    static void autoExposureAdjustement(uchar* data, int width, int height, bool sb,
-                                        double &black, double &expo);
-
-    static void autoWBAdjustementFromColor(const QColor &tc, double &temperature, double &green);
-
-private:
-
-    void setRGBmult();
-    void setLUTv();
-    void adjustWhiteBalance(uchar *data, int width, int height, bool sixteenBit);
-    inline unsigned short pixelColor(int colorMult, int index, int value);
-
-private:
-
-    WhiteBalancePriv* d;
-};
-
-#endif /* WHITEBALANCE_H */
diff --git a/src/analysePlot.cpp b/src/analysePlot.cpp
index 557d50e06f6171bec5b5888a502e9a241a700a2b..956630d084550312409ddcaed62ee80079e6630b 100644
--- a/src/analysePlot.cpp
+++ b/src/analysePlot.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include <QPainter>
 #include <QMouseEvent>
 
@@ -75,7 +95,7 @@ public:
         lastY = e->y();
 
         //if (e->button() == Qt::MidButton) fkt bei move nicht
-        if (e->buttons() == Qt::MidButton)
+        if (e->buttons() == Qt::MiddleButton)
         {
             plot()->setAutoReplot(false);
             for (int axis = 0; axis < QwtPlot::axisCnt; axis++)
diff --git a/src/animation.cpp b/src/animation.cpp
index 166bc37230ae14a2e6f68ca301d04b34b400f772..3d3bf43126fdf5a851fa94ce5890f935ba62bee3 100644
--- a/src/animation.cpp
+++ b/src/animation.cpp
@@ -1,4 +1,24 @@
-/*
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
+/*
 
 Class Animation
 Edited by: Ricardo Martin Brualla, 01.02.2007
@@ -53,7 +73,6 @@ Animation::Animation(QWidget *wParent)
     mImgSeq = false;
     mCameraLiveStream = false;
     mCurrentFrame = -1;
-    mSpeedup = 1;
     mMaxFrames = -1;
     mSourceInFrame = -1;
     mSourceOutFrame = -1;
@@ -94,13 +113,13 @@ Animation::~Animation()
 // Returns a pointer to the next frame of the animation 
 Mat Animation::getNextFrame()
 {
-    return getFrameAtIndex(mCurrentFrame+mSpeedup);
+    return getFrameAtIndex(mCurrentFrame+1);
 }
 
 // Returns a pointer to the previous frame of the animation
 Mat Animation::getPreviousFrame()
 {
-    return getFrameAtIndex(mCurrentFrame-mSpeedup);
+    return getFrameAtIndex(mCurrentFrame-1);
 }
 
 // Returns a pointer to the frame at the index index
@@ -138,10 +157,23 @@ Mat Animation::getCurrentFrame()
 {
     return mImage;
 }
-// Returns the speedup to accelerate the video speed
-int Animation::getSpeedup()
+
+/**
+ * @brief Skips (grabs) the given number of frames (default 1)
+ * @param num Number of frames to skip.
+ */
+void Animation::skipFrame(int num)
 {
-    return mSpeedup;
+    if(mVideoCapture.isOpened())
+    {
+        int lastFrameNum = getSourceOutFrameNum();
+        for(int i = 0; i < num && mCurrentFrame < lastFrameNum; ++i)
+        {
+            mVideoCapture.grab();
+            mCurrentFrame += 1;
+            mMainWindow->updateShowFPS(true);
+        }
+    }
 }
 
 // reads the .time file of bumblebee xb3 experiments
@@ -452,7 +484,6 @@ void Animation::reset()
     mImgSeq = false;
     mCameraLiveStream = false;
     mCurrentFrame = -1;
-    mSpeedup = 1;
     mMaxFrames = -1;
     mSourceInFrame = -1;
     mSourceOutFrame = -1;
diff --git a/src/autoCalib.cpp b/src/autoCalib.cpp
index a12dd2a55cae98b881c8cf77af13f8b66e876892..47e3037436007b6202281e51248c4d79537dd911 100644
--- a/src/autoCalib.cpp
+++ b/src/autoCalib.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include <QFileInfo>
 #include <QFileDialog>
 #include <QMessageBox>
diff --git a/src/aviFileWriter.cpp b/src/aviFileWriter.cpp
index f3ecc27e5c209b39cc1ac3e67e4280d508c14267..39f877b9f78d68d0734268a8da5a859727b296fd 100644
--- a/src/aviFileWriter.cpp
+++ b/src/aviFileWriter.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 
 
 //=============================================================================
diff --git a/src/backgroundFilter.cpp b/src/backgroundFilter.cpp
index dc0acc20b62ba6206e2f9cfced94e32efa8c797a..f67b0823894bd8c842d05585bf52bd15c9cd47cd 100644
--- a/src/backgroundFilter.cpp
+++ b/src/backgroundFilter.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include "backgroundFilter.h"
 #include "stereoContext.h"
 
diff --git a/src/backgroundItem.cpp b/src/backgroundItem.cpp
index b4574eeae913737892af85f4aea21efe1343f09b..68a72da9e6eda6ed4c816ca4ff514070dc00fca6 100644
--- a/src/backgroundItem.cpp
+++ b/src/backgroundItem.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include <QtWidgets>
 
 #include "petrack.h"
diff --git a/src/blurFilter.cpp b/src/blurFilter.cpp
index 955b66ba49460ca2120fe496916a278c0dd78bc7..c9c40bb3a4d02f156fc7cb7e9989bc56ff8aa6c3 100644
--- a/src/blurFilter.cpp
+++ b/src/blurFilter.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include "blurFilter.h"
 #include "opencv2/opencv.hpp"
 
diff --git a/src/borderFilter.cpp b/src/borderFilter.cpp
index 6ffa73b50d489b80eca35825f8b5adf9655e838b..36d27d3a1f0659cd361409e2185767437fd5dc2d 100644
--- a/src/borderFilter.cpp
+++ b/src/borderFilter.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include "borderFilter.h"
 #include "helper.h"
 
diff --git a/src/brightContrastFilter.cpp b/src/brightContrastFilter.cpp
index 21ea61b5b5f20f27499566c308549eab5d60e58b..db725ecd4eddf5f642d49d1d506c49ff73c64a6e 100644
--- a/src/brightContrastFilter.cpp
+++ b/src/brightContrastFilter.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include "brightContrastFilter.h"
 
 using namespace::cv;
diff --git a/src/brightFilter.cpp b/src/brightFilter.cpp
index 550b8352cad9814b4f659468e2bb606f97a9c572..10287a7133a9bc0806d5ef9deb0a8f7f2693c48b 100644
--- a/src/brightFilter.cpp
+++ b/src/brightFilter.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include "brightFilter.h"
 
 BrightFilter::BrightFilter()
diff --git a/src/calibFilter.cpp b/src/calibFilter.cpp
index 58a62142fae6fefc51a410b9df5c043467aa9b42..89120cfbf20cc3079510d2590ad1adb22ef7c0c8 100644
--- a/src/calibFilter.cpp
+++ b/src/calibFilter.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include "calibFilter.h"
 #include "helper.h"
 
diff --git a/src/calibStereoFilter.cpp b/src/calibStereoFilter.cpp
index 7fad562ff3cd637aa03f8555afbcc4bcf9f4e2ec..e449a16fbe820e61844c556edd8f4eab41f0f06b 100644
--- a/src/calibStereoFilter.cpp
+++ b/src/calibStereoFilter.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include "calibStereoFilter.h"
 
 using namespace::cv;
diff --git a/src/codeMarkerItem.cpp b/src/codeMarkerItem.cpp
index ff35bcc46eb9802bf317f97293232710d392c4ce..6dc49b64e1a2582a174686ef413506ad5927c6df 100644
--- a/src/codeMarkerItem.cpp
+++ b/src/codeMarkerItem.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include <QtWidgets>
 
 #include "petrack.h"
diff --git a/src/codeMarkerWidget.cpp b/src/codeMarkerWidget.cpp
index cbd6944499573fa6f8b6a5bf58d9e0a1490b0e3a..602e5dc304f84fc00d0e669529c02e53f53c54b2 100644
--- a/src/codeMarkerWidget.cpp
+++ b/src/codeMarkerWidget.cpp
@@ -1,4 +1,24 @@
-#include "codeMarkerWidget.h"
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
+#include "codeMarkerWidget.h"
 
 CodeMarkerWidget::CodeMarkerWidget(QWidget *parent)
     : QWidget(parent)
diff --git a/src/colorMarkerItem.cpp b/src/colorMarkerItem.cpp
index 134a94c9a0b27438895f8b431f9b4a9b9575a57e..4b8f9add257ca4b642f66ecd874204afa903d24f 100644
--- a/src/colorMarkerItem.cpp
+++ b/src/colorMarkerItem.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include <QtWidgets>
 
 #include "petrack.h"
diff --git a/src/colorMarkerWidget.cpp b/src/colorMarkerWidget.cpp
index a6abd66b5439f3053968f7fa20dd9e3a4b21b35c..b24cf870d159669497ed0c7cf193f16ddbbd2419 100644
--- a/src/colorMarkerWidget.cpp
+++ b/src/colorMarkerWidget.cpp
@@ -1,4 +1,24 @@
-#include "colorMarkerWidget.h"
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
+#include "colorMarkerWidget.h"
 
 ColorMarkerWidget::ColorMarkerWidget(QWidget *parent)
     : QWidget(parent)
diff --git a/src/colorPlot.cpp b/src/colorPlot.cpp
index 8ae60155e796e545976aa968f6a08197b86e2573..67ad557c20ffe97f3ea11d4e167367cea70bf16d 100644
--- a/src/colorPlot.cpp
+++ b/src/colorPlot.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include <iomanip>
 
 #include <QPainter>
@@ -396,8 +416,24 @@ int RectPlotItem::addMap()
 
 void RectPlotItem::delMap(int index)
 {
+    if(mMaps.size() == 1){
+        if(index != 0)
+        {
+            debout << "Invalid index for map deletion!" << std::endl;
+            return;
+        }
+        mMaps.replace(0, RectMap());
+        return;
+    }
+
     if (index >= 0 && index < mMaps.size() && mMaps.size() > 0)
+    {
         mMaps.removeAt(index);
+        return;
+    }
+
+    debout << "Invalid index for map deletion!" << std::endl;
+    return;
 }
 
 void RectPlotItem::changeMap(int index, double x, double y, double w, double h, bool colored, double mapHeight)
@@ -437,17 +473,29 @@ void RectPlotItem::changeActMapToColor(const QColor &toCol)
 
 bool RectPlotItem::getActMapInvHue()
 {
-    return mMaps[mActIndex].invHue();
+    if (mActIndex >= 0 && mActIndex < mMaps.size())
+    {
+        return mMaps[mActIndex].invHue();
+    }
+    return false; // Dependent on other fail checks
 }
 
 QColor RectPlotItem::getActMapToColor()
 {
-    return mMaps[mActIndex].toColor();
+    if (mActIndex >= 0 && mActIndex < mMaps.size())
+    {
+        return mMaps[mActIndex].toColor();
+    }
+    return QColor::Invalid;
 }
 
 QColor RectPlotItem::getActMapFromColor()
 {
-    return mMaps[mActIndex].fromColor();
+    if (mActIndex >= 0 && mActIndex < mMaps.size())
+    {
+        return mMaps[mActIndex].fromColor();
+    }
+    return QColor::Invalid;
 }
 
 RectMap RectPlotItem::getMap(int index) const
@@ -578,7 +626,7 @@ public:
         lastY = e->y();
 
         //if (e->button() == Qt::MidButton) fkt bei move nicht
-        if (e->buttons() == Qt::MidButton)
+        if (e->buttons() == Qt::MiddleButton)
         {
             plot()->setAutoReplot(false);
             for (int axis = 0; axis < QwtPlot::axisCnt; axis++)
diff --git a/src/colorRangeWidget.cpp b/src/colorRangeWidget.cpp
index 43a5ffc8a021517c03f08ae2b22e688cab84e524..a743a2aaf28e391b30a4e17a7050d9a3d7b226cf 100644
--- a/src/colorRangeWidget.cpp
+++ b/src/colorRangeWidget.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include "colorRangeWidget.h"
 #include "control.h"
 
diff --git a/src/contrastFilter.cpp b/src/contrastFilter.cpp
index 689d11d809b1b08f2727ddf7e8792981ea014ea3..693684da17c26fed0ec3acf735afefa55e77fded 100644
--- a/src/contrastFilter.cpp
+++ b/src/contrastFilter.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include "contrastFilter.h"
 
 ContrastFilter::ContrastFilter()
diff --git a/src/control.cpp b/src/control.cpp
index 8758c6fb20948d1c7c56d4127348008d9fa0c532..865b24d8115703924336870976de5d60346e8d25 100644
--- a/src/control.cpp
+++ b/src/control.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include <QDomElement>
 #include <iomanip>
 
@@ -3211,21 +3231,20 @@ void Control::getXml(QDomElement &elem)
 void Control::on_colorPickerButton_clicked(bool checked)
 {
     //true wenn neu gechecked, false wenn wieder abgewählt
+    GraphicsView *view = mMainWindow->getView();
     if(checked)
     {
-        connect(mMainWindow->getView(), SIGNAL(colorSelected(QPoint, GraphicsView*)), this, SLOT(on_expandColor(QPoint, GraphicsView*)));
-        connect(mMainWindow->getView(), SIGNAL(setColorEvent(QPoint, GraphicsView*)), this, SLOT(on_setColor(QPoint, GraphicsView*)));
+        connect(view, &GraphicsView::colorSelected, this, &Control::on_expandColor);
+        connect(view, &GraphicsView::setColorEvent, this, &Control::on_setColor);
     }else{
-        disconnect(mMainWindow->getView(), SIGNAL(colorSelected(QPoint, GraphicsView*)), this, SLOT(on_expandColor(QPoint, GraphicsView*)));
-        disconnect(mMainWindow->getView(), SIGNAL(setColorEvent(QPoint, GraphicsView*)), this, SLOT(on_setColor(QPoint, GraphicsView*)));
+        disconnect(view, &GraphicsView::colorSelected, this, &Control::on_expandColor);
+        disconnect(view, &GraphicsView::setColorEvent, this, &Control::on_setColor);
     }
 }
 
 /**
  * @brief Gets necessary colors and the RectPlotItem
  *
- * @param[in] p Clicked Point (gets changed!!!)
- * @param[in] graphicsView GraphicsView in which the event was detected
  * @param[out] clickedColor color which was clicked on, with Hue from 0-360 instead of OpenCVs 0-180
  * @param[out] toColor toColor as in model with triangle color picker
  * @param[out] fromColor fromColor as in model with triangle picker
@@ -3233,35 +3252,33 @@ void Control::on_colorPickerButton_clicked(bool checked)
  *
  * @return Boolean describing, if a color was retrieved
  */
-bool Control::getColors(QPoint& p, GraphicsView* graphicsView, std::array<int, 3>& clickedColor, QColor& toColor, QColor& fromColor, RectPlotItem*& map)
+bool Control::getColors(QColor& clickedColor, QColor& toColor, QColor& fromColor, RectPlotItem*& map)
 {
     if(mMainWindow->getImg().empty())
     {
         return false;
     }
 
-    cv::Mat hsvImg;
-    cv::cvtColor(mMainWindow->getImg(), hsvImg, cv::COLOR_BGR2HSV);
-    p.setX(p.x() + mMainWindow->getImageBorderSize());
-    p.setY(p.y() + mMainWindow->getImageBorderSize());
+    QImage *hsvImg = mMainWindow->getImage();
+    QPointF imgPoint = mMainWindow->getMousePosOnImage();
 
-
-    QPointF pointOnScene = graphicsView->mapToScene(p);
-    QPointF imgPoint = mMainWindow->getImageItem()->mapToScene(pointOnScene);
-    if(imgPoint.x() < 0 || imgPoint.x() > hsvImg.cols || imgPoint.y() < 0 || imgPoint.y() > hsvImg.rows)
+    if(imgPoint.x() < 0 || imgPoint.x() > hsvImg->width() || imgPoint.y() < 0 || imgPoint.y() > hsvImg->height())
     {
         debout << "Clicked outside the image with color picker." << std::endl;
         return false;
     }
     //debout << "Koordinaten: " << imgPoint.x() << ", " << imgPoint.y() << std::endl;
 
-    cv::Vec3b color = hsvImg.at<cv::Vec3b>((int)imgPoint.y(), (int)imgPoint.x());
-    clickedColor =  {color[0] * 2, color[1], color[2]};
+    clickedColor = QColor {hsvImg->pixel(imgPoint.toPoint())};
     //debout << "Farbe: " << (int)clickedColor[0] << ", " << (int)clickedColor[1] << ", " << (int)clickedColor[2] << std::endl;
 
     map = this->getColorPlot()->getMapItem();
     toColor = map->getActMapToColor();
     fromColor = map->getActMapFromColor();
+    if(!toColor.isValid() || !fromColor.isValid()){
+        debout << "Map is corrupted" << std::endl;
+        return false;
+    }
     return true;
 }
 
@@ -3275,13 +3292,13 @@ bool Control::getColors(QPoint& p, GraphicsView* graphicsView, std::array<int, 3
  * @param p
  * @param graphicsView
  */
-void Control::on_expandColor(QPoint p, GraphicsView* graphicsView)
+void Control::on_expandColor()
 {
 
     QColor fromColor, toColor;
     RectPlotItem* map;
-    std::array<int, 3> clickedColor;
-    if(!getColors(p, graphicsView, clickedColor, toColor, fromColor, map))
+    QColor clickedColor;
+    if(!getColors(clickedColor, toColor, fromColor, map))
     {
         return;
     }
@@ -3297,36 +3314,37 @@ void Control::on_expandColor(QPoint p, GraphicsView* graphicsView)
  * @param p
  * @param graphicsView
  */
-void Control::on_setColor(QPoint p , GraphicsView* graphicsView){
+void Control::on_setColor()
+{
     constexpr int BUFFER = 5;
 
     QColor fromColor, toColor;
     RectPlotItem* map;
-    std::array<int, 3> clickedColor;
-    if(!getColors(p, graphicsView, clickedColor, toColor, fromColor, map))
+    QColor clickedColor;
+    if(!getColors(clickedColor, toColor, fromColor, map))
     {
         return;
     }
 
     int minHue, maxHue;
-    if( (clickedColor[0]+BUFFER)%359 < clickedColor[0]+BUFFER)
+    if( (clickedColor.hue()+BUFFER)%359 < clickedColor.hue()+BUFFER)
     {
-        maxHue = (clickedColor[0]+BUFFER)%BUFFER;
+        maxHue = (clickedColor.hue()+BUFFER)%BUFFER;
         map->changeActMapInvHue(true);
     }else{
-        maxHue = clickedColor[0]+BUFFER;
+        maxHue = clickedColor.hue()+BUFFER;
         map->changeActMapInvHue(false);
     }
-    if( (clickedColor[0] - BUFFER) < 0)
+    if( (clickedColor.hue() - BUFFER) < 0)
     {
-        minHue = 360 + (clickedColor[0] - BUFFER);
+        minHue = 360 + (clickedColor.hue() - BUFFER);
         map->changeActMapInvHue(true);
     }else{
-        minHue = clickedColor[0] - BUFFER;
+        minHue = clickedColor.hue() - BUFFER;
         //map->changeActMapInvHue(false);
     }
-    toColor.setHsv(maxHue, min((clickedColor[1]+BUFFER),255), min(clickedColor[2]+BUFFER, 255));
-    fromColor.setHsv(minHue, max(clickedColor[1]-BUFFER,0), max(clickedColor[2]-BUFFER,0));
+    toColor.setHsv(maxHue, min((clickedColor.saturation()+BUFFER),255), min(clickedColor.value()+BUFFER, 255));
+    fromColor.setHsv(minHue, max(clickedColor.saturation()-BUFFER,0), max(clickedColor.value()-BUFFER,0));
 
     //debout << "Inv Hue nach setCol: " <<  map->getActMapInvHue() << std::endl;
     saveChange(fromColor, toColor, map);
@@ -3360,11 +3378,13 @@ void Control::saveChange(const QColor& fromColor, const QColor& toColor, RectPlo
  * @param toColor[in,out] toColor of the map, gets changed!
  * @param clickedColor[in]
  */
-void Control::expandRange(QColor& fromColor, QColor& toColor, const std::array<int, 3>& clickedColor)
+void Control::expandRange(QColor& fromColor, QColor& toColor, const QColor& clickedColor)
 {
     // NOTE BUFFER in Klassenebene verschieben und bei setColor auch nutzen? (verschiedene Größe vllt. gewünscht?)
     constexpr int BUFFER = 10;
 
+    std::array<int, 3> clickedColorArr;
+    clickedColor.getHsv(&clickedColorArr[0], &clickedColorArr[1], &clickedColorArr[2]);
     std::array<int, 3> toColorArr;
     toColor.getHsv(&toColorArr[0], &toColorArr[1], &toColorArr[2]);
     std::array<int, 3> fromColorArr;
@@ -3380,30 +3400,30 @@ void Control::expandRange(QColor& fromColor, QColor& toColor, const std::array<i
     // What values do need to be altered?
     if(invHue)
     {
-        if(toColorArr[0] > fromColorArr[0])
+        if(toColor.hue() > fromColor.hue())
         {
-            if(!(clickedColor[0] >= toColorArr[0] || clickedColor[0] <= fromColorArr[0]))
+            if(!(clickedColor.hue() >= toColor.hue() || clickedColor.hue() <= fromColor.hue()))
             {
                 isInRange[0] = false;
             }
         }else
         {
-            if(!(clickedColor[0] <= toColorArr[0] || clickedColor[0] >= fromColorArr[0]))
+            if(!(clickedColor.hue() <= toColor.hue() || clickedColor.hue() >= fromColor.hue()))
             {
                 isInRange[0] = false;
             }
         }
     }else
     {
-        if(toColorArr[0] > fromColorArr[0])
+        if(toColor.hue() > fromColor.hue())
         {
-            if(!(clickedColor[0] <= toColorArr[0] && clickedColor[0] >= fromColorArr[0]))
+            if(!(clickedColor.hue() <= toColor.hue() && clickedColor.hue() >= fromColor.hue()))
             {
                 isInRange[0] = false;
             }
         }else
         {
-            if(!(clickedColor[0] >= toColorArr[0] && clickedColor[0] <= fromColorArr[0]))
+            if(!(clickedColor.hue() >= toColor.hue() && clickedColor.hue() <= fromColor.hue()))
             {
                 isInRange[0] = false;
             }
@@ -3414,12 +3434,12 @@ void Control::expandRange(QColor& fromColor, QColor& toColor, const std::array<i
     {
         if(toColorArr[i] > fromColorArr[i])
         {
-            if(!(clickedColor[i] <= toColorArr[i] && clickedColor[i] >= fromColorArr[i]))
+            if(!(clickedColorArr[i] <= toColorArr[i] && clickedColorArr[i] >= fromColorArr[i]))
             {
                 isInRange[i] = false;
             }
         }else{
-            if(!(clickedColor[i] >= toColorArr[i] && clickedColor[i] <= fromColorArr[i]))
+            if(!(clickedColorArr[i] >= toColorArr[i] && clickedColorArr[i] <= fromColorArr[i]))
             {
                 isInRange[i] = false;
             }
@@ -3439,26 +3459,26 @@ void Control::expandRange(QColor& fromColor, QColor& toColor, const std::array<i
         if(isInRange[i])
             continue;
 
-        distToColor = abs(toColorArr[i] - clickedColor[i]);
-        distFromColor = abs(fromColorArr[i] - clickedColor[i]);
+        distToColor = abs(toColorArr[i] - clickedColorArr[i]);
+        distFromColor = abs(fromColorArr[i] - clickedColorArr[i]);
         if(distFromColor < distToColor)
         {
-            int buffer = fromColorArr[i] - clickedColor[i] < 0 ? BUFFER : -BUFFER;
+            int buffer = fromColorArr[i] - clickedColorArr[i] < 0 ? BUFFER : -BUFFER;
             if(i==0) // Hue
             {
-                fromColorArr[i] = min(359, max(0, clickedColor[i] + buffer));
+                fromColorArr[i] = min(359, max(0, clickedColorArr[i] + buffer));
             }else
             {
-                fromColorArr[i] = min(255, max(0, clickedColor[i] + buffer));
+                fromColorArr[i] = min(255, max(0, clickedColorArr[i] + buffer));
             }
         }else{
-            int buffer = toColorArr[i] - clickedColor[i] < 0 ? BUFFER : -BUFFER;
+            int buffer = toColorArr[i] - clickedColorArr[i] < 0 ? BUFFER : -BUFFER;
             if(i==0) // Hue
             {
-                toColorArr[i] = min(359, max(0, clickedColor[i] + buffer));
+                toColorArr[i] = min(359, max(0, clickedColorArr[i] + buffer));
             }else
             {
-                toColorArr[i] = min(255, max(0, clickedColor[i] + buffer));
+                toColorArr[i] = min(255, max(0, clickedColorArr[i] + buffer));
             }
         }
     }
diff --git a/src/coordItem.cpp b/src/coordItem.cpp
index 823741db43afc392de57b94c08d216cc5dbc383c..0a284c544912b8520f6f5e8338e5c07db15f0ba8 100644
--- a/src/coordItem.cpp
+++ b/src/coordItem.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include <algorithm>
 #include <math.h>
 #include <QtWidgets>
@@ -167,7 +187,7 @@ void CoordItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
                 mControlWidget->setCalibCoordTransY(mControlWidget->getCalibCoordTransY()+(int)(10.*diff.y()));
             }
         }
-        else if (event->buttons() == Qt::MidButton)
+        else if (event->buttons() == Qt::MiddleButton)
         {
             if( mControlWidget->getCalibCoordDimension() == 0 )
             {
diff --git a/src/ellipse.cpp b/src/ellipse.cpp
index 866b65e325751cc6c2c1d03a4888aa3ed11afc83..f3660ca66664dca403bb6bb1bb39b986ce698b88 100644
--- a/src/ellipse.cpp
+++ b/src/ellipse.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include <cmath>
 
 #include <QPointF>
diff --git a/src/extrCalibration.cpp b/src/extrCalibration.cpp
index 03bf302e193e438a03136b7a13e7d9dbfaaffc63..239c1ce1f56d0a4f82b862f4cb699075a7c02150 100644
--- a/src/extrCalibration.cpp
+++ b/src/extrCalibration.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include <QtWidgets>
 #include <QFileDialog>
 #include <QMessageBox>
diff --git a/src/filter.cpp b/src/filter.cpp
index 9469a43333c7f1a0b0340aef42ff616bff58600d..cc29511801483e578ff8020694c41647f7e06ed6 100644
--- a/src/filter.cpp
+++ b/src/filter.cpp
@@ -1,4 +1,24 @@
-#include "filter.h"
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
+#include "filter.h"
 #include "helper.h"
 
 using namespace::cv;
@@ -99,73 +119,40 @@ void Filter::setChanged(bool b)
     mChg=b;
 }
 
-//void Filter::setResStored(bool b)
-//{
-//    mResStored=b;
-//}
-
+/**
+ * @brief Applies filter and sets changed to false
+ *
+ * Applies the filter and after that sets changed to false
+ * The filter is only applied, when it is enabled, else
+ * the img just gets returned without filtering.
+ *
+ * @param img Image to apply filter to
+ * @return filtered image
+ */
 Mat Filter::apply(Mat &img)
 {
-    mChg = false;
-
     if (getEnabled())
     {
         if (getOnCopy())
         {
-//            mResStored = true;
             Mat res(Size(img.cols,img.rows),CV_8UC(img.channels()));
-            return mRes = act(img,res);
+            mRes = act(img,res);
+            mChg = false;
+            return mRes;
         }else
         {
-//            mResStored = false;
-            return mRes = act(img,img);
+            mRes = act(img,img);
+            mChg = false;
+            return mRes;
         }
 
     }else
     {
-//        mRes = img;
-//        mResStored = false;
+        mChg = false;
         return mRes = img;
     }
 }
 
-// apply on original Data
-//IplImage* Filter::apply(IplImage *img)
-//{
-//    mChg = false; // dass sich filter mit param gaendert haben kann zurueckgesetzt weren
-//                  // da der filter nun angewandt wird
-
-//    if (mResStored == true) // wenn beim letzten Mal Speicherplatz angelegt wurde
-//        cvReleaseImage(&mRes);
-
-
-//    if (getEnabled())
-//    {
-//        if (getOnCopy())
-//        {
-//            mResStored = true;
-//            IplImage *res = cvCreateImage(cvGetSize(img),8,img->nChannels);
-//            //res->origin = img->origin; // because 1 - bottom-left origin (Windows bitmaps style) is not default!!!
-
-//            mRes=act(img, res);// depth/Farbtiefe pro Kanal 8, channels/Kanaele == 1 oder 3 bei mir erlaubt
-//            cvReleaseImage(&res);
-
-//            return mRes;
-//        }
-//        else
-//        {
-//            // hier muesste noch beachtet werden, dass mIplImage von hauptanwendung nicht uebergeben wurde!!!!
-//            mResStored = false;
-//            return mRes=act(img, img);
-//        }
-
-//    }
-//    else
-//    {
-//        mResStored = false;
-//        return mRes=img;
-//    }
-//}
 Mat Filter::getLastResult()
 {
     return mRes;
diff --git a/src/gridItem.cpp b/src/gridItem.cpp
index 7b135fbcb28778ff263b266888ea6e3dfec27381..b23f59b75b4a310a0e05abcd5c5600bfded97fb2 100644
--- a/src/gridItem.cpp
+++ b/src/gridItem.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include <QtWidgets>
 #include <math.h>
 #include <stdlib.h>
@@ -70,7 +90,7 @@ void GridItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
                 mControlWidget->setCalibGridTransY(mControlWidget->getCalibGridTransY()+(int)(10.*diff.y()));
             }
         }
-        else if (event->buttons() == Qt::MidButton)
+        else if (event->buttons() == Qt::MiddleButton)
         {
             if( mControlWidget->getCalibGridDimension() == 0)
             {
diff --git a/src/helper.cpp b/src/helper.cpp
index fc1470aa6c3f3f0758ab8ba20a1c3099e2c77fc0..e1ac4c3c17d41db1b96b815a04850a135e3e64ba 100644
--- a/src/helper.cpp
+++ b/src/helper.cpp
@@ -1,4 +1,24 @@
-#include "helper.h"
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
+#include "helper.h"
 
 //#include <opencv.hpp>
 #include "opencv2/opencv.hpp"
diff --git a/src/imageItem.cpp b/src/imageItem.cpp
index 496a6fc864709b6313536df8da92e1a11a4950fd..b7712d4856c8c7ea480bd94d324ba282205728a2 100644
--- a/src/imageItem.cpp
+++ b/src/imageItem.cpp
@@ -1,4 +1,24 @@
-#include <QGraphicsScene>
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
+#include <QGraphicsScene>
 #include <QPainter>
 #include <QGraphicsSceneHoverEvent>
 
diff --git a/src/logoItem.cpp b/src/logoItem.cpp
index d6162e029efb776ec5974fed664f3400643028e0..a351b6b12ef5eea25358bb185c2aa0a9c7b4e26a 100644
--- a/src/logoItem.cpp
+++ b/src/logoItem.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include <QGraphicsScene>
 #include <QPainter>
 #include <QApplication>
diff --git a/src/main.cpp b/src/main.cpp
index 716f07cea3cddbf9404326345a5453bb40353768..bcd2730dbc0fc5db7e1db6db7fae1d17bc85b1cf 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1,4 +1,24 @@
-#include <QApplication>
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
+#include <QApplication>
 #include <QtWidgets>
 #include <QMessageBox>
 #include <QStyleFactory>
diff --git a/src/markerCasern.cpp b/src/markerCasern.cpp
index 9fd280ef37341081d5cf10325131804992f94b92..92adc6e35430a8b9789131f32a98b53b533e3df9 100644
--- a/src/markerCasern.cpp
+++ b/src/markerCasern.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 //folgende zeile spaeter raus
 #include "opencv2/highgui.hpp"
 
@@ -134,7 +154,7 @@ void MarkerCasern::modifyQuadrangle(const Vec2F v[4])
     if (mHasQuadrangle)
     {
         // seitenverhaeltnis 2:3 koennte auch bedacht werden
-        // angle on opposed edge is nearer to 90° 
+        // angle on opposed edge is nearer to 90� 
         if ((fabs((v[3]-v[2]).angleBetweenVec(v[0]-v[3])-PI/2.)+
              fabs((v[1]-v[0]).angleBetweenVec(v[2]-v[1])-PI/2.)) <
             (fabs((mQuadrangle[3]-mQuadrangle[2]).angleBetweenVec(mQuadrangle[0]-mQuadrangle[3])-PI/2.)+
diff --git a/src/markerColor.cpp b/src/markerColor.cpp
index c1f6634a115769a1a4eda0ee3bd755cc56d7c9a7..4b11cd1967a1a38afdd3aefa620f1f206e7f1461 100644
--- a/src/markerColor.cpp
+++ b/src/markerColor.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 //folgende zeile spaeter raus
 #include "opencv2/highgui.hpp"
 
@@ -134,7 +154,7 @@ void MarkerColor::modifyQuadrangle(const Vec2F v[4])
     if (mHasQuadrangle)
     {
         // seitenverhaeltnis 2:3 koennte auch bedacht werden
-        // angle on opposed edge is nearer to 90° 
+        // angle on opposed edge is nearer to 90� 
         if ((fabs((v[3]-v[2]).angleBetweenVec(v[0]-v[3])-PI/2.)+
              fabs((v[1]-v[0]).angleBetweenVec(v[2]-v[1])-PI/2.)) <
             (fabs((mQuadrangle[3]-mQuadrangle[2]).angleBetweenVec(mQuadrangle[0]-mQuadrangle[3])-PI/2.)+
diff --git a/src/markerHermes.cpp b/src/markerHermes.cpp
index be6650bd9a596eb45fb2c7e440d16f1f9f02731d..51d3696f5844ac9b24cfdf5e372c4769ebe8d154 100644
--- a/src/markerHermes.cpp
+++ b/src/markerHermes.cpp
@@ -1,4 +1,24 @@
-//folgende zeile spaeter raus
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
+//folgende zeile spaeter raus
 #include "opencv2/highgui.hpp"
 
 // spaeter entfernen naechsten beiden zeilen
diff --git a/src/markerJapan.cpp b/src/markerJapan.cpp
index 0dbbedd170053c02e76e3a0526460316dd04c2fb..64c255728efb756b2c7de90c9567f7070aae27d9 100644
--- a/src/markerJapan.cpp
+++ b/src/markerJapan.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 //folgende zeile spaeter raus
 #include "opencv2/highgui.hpp"
 
@@ -138,7 +158,7 @@ void MarkerJapan::modifyQuadrangle(const Vec2F v[4])
     if (mHasQuadrangle)
     {
         // seitenverhaeltnis 2:3 koennte auch bedacht werden
-        // angle on opposed edge is nearer to 90°
+        // angle on opposed edge is nearer to 90
         if ((fabs((v[3]-v[2]).angleBetweenVec(v[0]-v[3])-PI/2.)+
              fabs((v[1]-v[0]).angleBetweenVec(v[2]-v[1])-PI/2.)) <
             (fabs((mQuadrangle[3]-mQuadrangle[2]).angleBetweenVec(mQuadrangle[0]-mQuadrangle[3])-PI/2.)+
diff --git a/src/multiColorMarkerItem.cpp b/src/multiColorMarkerItem.cpp
index af85d3fb35d767f8fb3fb8ec62ef279bed21c54c..807ae5d168d4aa4573c222c28f619fb9b4ef4ad1 100644
--- a/src/multiColorMarkerItem.cpp
+++ b/src/multiColorMarkerItem.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include <QtWidgets>
 
 #include "petrack.h"
diff --git a/src/multiColorMarkerWidget.cpp b/src/multiColorMarkerWidget.cpp
index 6917a7a46110a857de0d48c8b33ffffce7afcec3..44874e78e6941418c4f82f9a65f4a318ca11cb53 100644
--- a/src/multiColorMarkerWidget.cpp
+++ b/src/multiColorMarkerWidget.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include "multiColorMarkerWidget.h"
 
 MultiColorMarkerWidget::MultiColorMarkerWidget(QWidget *parent)
diff --git a/src/person.cpp b/src/person.cpp
index bb233999ef4991e300b779ecd412062dd7061303..52e4d30185bef491447d0293a8ea0c5be9fcf1a8 100644
--- a/src/person.cpp
+++ b/src/person.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include "person.h"
 #include "helper.h"
 //#include "highgui.h"
@@ -228,8 +248,8 @@ int frameNum = mSc->getAnimation()->getCurrentFrameNum();
                 //     entspricht:
                 // < 4.2cm x 4.2cm=18cm^2  = 50 Pixel in maximaler personengroesse
                 //in maximaler Entfernung zur Kamera
-                //(in ebenen Versuchen entspricht dies 40cm über Bodenhöhe)
-                //größer als 4500cm^2 = 8000 Pixel
+                //(in ebenen Versuchen entspricht dies 40cm über Bodenhöhe)
+                //größer als 4500cm^2 = 8000 Pixel
 
                 if (contourArea>l1*l1 && contourArea<l2*l2)
                 {
@@ -464,7 +484,7 @@ void PersonList::insertEllipses(const QList<MyEllipse> &el, float distFromCam) /
     Vec2F center;
 
     float r1Max = 60./mSc->getCmPerPixel(.01*distFromCam); // war 80 px am boden ist 60cm // radius der ellips mit maxmalem radius 80 pixel
-    float r1Min = 10./mSc->getCmPerPixel(.01*distFromCam); // war 15 px in Schulterhohe sei 10cm // laenge der grossen Hauptachse in mittlerer Kopfhöhe
+    float r1Min = 10./mSc->getCmPerPixel(.01*distFromCam); // war 15 px in Schulterhohe sei 10cm // laenge der grossen Hauptachse in mittlerer Kopfhöhe
 
     for (i = 0; i < el.size(); ++i) // ueber uebergebene liste von ellipsen
     {
@@ -617,14 +637,14 @@ void PersonList::optimize()
     for (int i = 0; i < size(); ++i) // ueber uebergebene liste von ellipsen stacks
     { // r1 ist immer die groessere ausdehnung
         //debout << at(i).at(0).center().x() << " " << at(i).at(0).center().y() << " " << at(i).last().area() << endl;
-        // at(i).getDistTopEllipse()+10) // in cm // 10 cm (eigentlich 10+step_size/2) unterhalb körpergröße
+        // at(i).getDistTopEllipse()+10) // in cm // 10 cm (eigentlich 10+step_size/2) unterhalb körpergröße
         float r1Max = 34./mSc->getCmPerPixel(.01*(at(i).getDistTopEllipse()+10)); // war 37.cm // war 60 px // 60px in kopfhoehe sind 37cm in kopfhoehe // radius der ellips mit maxmalem radius 80 pixel
 //        float r2Min = 12./mSc->getCmPerPixel(.01*(at(i).getDistTopEllipse()+20)); // war 60 px // 60px in kopfhoehe sind 37cm in kopfhoehe // radius der ellips mit maxmalem radius 80 pixel
         float areaMin = 22./mSc->getCmPerPixel(.01*(at(i).getDistTopEllipse()+100)); // 22. = 12.5*sqrt(Pi) wg area = r1*r2*Pi
         areaMin = areaMin*areaMin;
 //        float areaMin2 = 35.45/mSc->getCmPerPixel(.01*(at(i).getDistTopEllipse()+100)); // 22. = 20*sqrt(Pi) wg area = r1*r2*Pi
 //        areaMin2 = areaMin2*areaMin2;
-//        // 1000 px^2 entspricht r1=r2 = 18 px = 12,5cm radius in oberschenkelhöhe bzw 100cm unterhalb kopf
+//        // 1000 px^2 entspricht r1=r2 = 18 px = 12,5cm radius in oberschenkelhöhe bzw 100cm unterhalb kopf
 //        if (at(i).last().area() < areaMin2 && at(i).last().area() >= areaMin)
 //            debout << "1250 cm2 loescht bei " << at(i).at(0).center().x() << " " << at(i).at(0).center().y() << endl;
         if (at(i).last().area() < areaMin) // war 1000 px // at(i).last().r1() < 15 nicht zu gross waehlen um auch nur kopferkennung in dichten situationen zuzulassen // war: area() < 1000) || // groesste ellips in pyr muss mindestgroesse besitzen
diff --git a/src/petrack.cpp b/src/petrack.cpp
index 54ff2eefcf229e30a2ef8b0c50d3ea6afc36cfda..91137a24ac0bd8c5fe014de062b70c4b3346f097 100644
--- a/src/petrack.cpp
+++ b/src/petrack.cpp
@@ -1,4 +1,24 @@
-#include <QtWidgets>
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
+#include <QtWidgets>
 #include <QtOpenGL>
 #include <QSignalMapper>
 
@@ -462,7 +482,7 @@ void Petrack::openXml(QDomDocument &doc, bool openSeq)
             }
             if (elem.hasAttribute("PLAYER_SPEED_FIXED"))
             {
-                mPlayerWidget->setPlayerSpeedFixed(elem.attribute("PLAYER_SPEED_FIXED").toInt());
+                mPlayerWidget->setPlayerSpeedLimited(elem.attribute("PLAYER_SPEED_FIXED").toInt());
             }
         }
         else if (elem.tagName() == "VIEW")
@@ -667,7 +687,7 @@ void Petrack::saveXml(QDomDocument &doc)
     elem.setAttribute("FPS", mAnimation->getFPS());
     elem.setAttribute("SOURCE_FRAME_IN", mPlayerWidget->getFrameInNum());
     elem.setAttribute("SOURCE_FRAME_OUT", mPlayerWidget->getFrameOutNum());
-    elem.setAttribute("PLAYER_SPEED_FIXED", mPlayerWidget->getPlayerSpeedFixed());
+    elem.setAttribute("PLAYER_SPEED_FIXED", mPlayerWidget->getPlayerSpeedLimited());
 
     root.appendChild(elem);
 
@@ -809,7 +829,7 @@ void Petrack::openCameraLiveStream(int camID)
         mLogoItem->fadeOut(50);
     updateCoord();
 
-    mPlayerWidget->playForward();
+    mPlayerWidget->play(PlayerState::FORWARD);
 }
 
 void Petrack::openSequence(QString fileName) // default fileName = ""
@@ -1356,7 +1376,7 @@ void Petrack::print()
         // HighResolution font zu gross! und laengere laufzeit und eher overflow
         // aber so pixelig und keine schoenen linien
         QPrinter printer(QPrinter::ScreenResolution); //ScreenResolution, HighResolution// liefert zu hause: QWin32PrintEngine::initialize: GetPrinter failed ()
-        printer.setPageSize(QPrinter::A4);
+        printer.setPageSize(QPageSize{QPageSize::PageSizeId::A4});
         QPrintDialog dialog(&printer, this);
         //printer.setOutputFormat(QPrinter::PostScriptFormat);
         if (dialog.exec()) {
@@ -1720,24 +1740,32 @@ void Petrack::createActions()
     connect(mCameraRightViewAct, SIGNAL(triggered()), this, SLOT(setCamera()));
     mCameraRightViewAct->setChecked(true); // right wird als default genommen, da reference image in triclops auch right ist // erste trj wurden mit left gerechnet
 
-    mFixToRealtime = new QAction(tr("&Realtime"));
-    connect(mFixToRealtime, &QAction::triggered, mPlayerWidget, [&](){mPlayerWidget->fixSpeedRelativeToRealtime(1.0);});
-    mFixTo2p00 = new QAction(tr("&x2"));
-    connect(mFixTo2p00, &QAction::triggered, mPlayerWidget, [&](){mPlayerWidget->fixSpeedRelativeToRealtime(2.0);});
-    mFixTo1p75 = new QAction(tr("&x1.75"));
-    connect(mFixTo1p75, &QAction::triggered, mPlayerWidget, [&](){mPlayerWidget->fixSpeedRelativeToRealtime(1.75);});
-    mFixTo1p50 = new QAction(tr("&x1.5"));
-    connect(mFixTo1p50, &QAction::triggered, mPlayerWidget, [&](){mPlayerWidget->fixSpeedRelativeToRealtime(1.5);});
-    mFixTo1p25 = new QAction(tr("&x1.25"));
-    connect(mFixTo1p25, &QAction::triggered, mPlayerWidget, [&](){mPlayerWidget->fixSpeedRelativeToRealtime(1.25);});
-    mFixTo0p75 = new QAction(tr("&x0.75"));
-    connect(mFixTo0p75, &QAction::triggered, mPlayerWidget, [&](){mPlayerWidget->fixSpeedRelativeToRealtime(0.75);});
-    mFixTo0p50 = new QAction(tr("&x0.5"));
-    connect(mFixTo0p50, &QAction::triggered, mPlayerWidget, [&](){mPlayerWidget->fixSpeedRelativeToRealtime(0.5);});
-    mFixTo0p25 = new QAction(tr("&x0.25"));
-    connect(mFixTo0p25, &QAction::triggered, mPlayerWidget, [&](){mPlayerWidget->fixSpeedRelativeToRealtime(0.25);});
-    mFixUnlimited = new QAction(tr("&Unlimited"));
-    connect(mFixUnlimited, &QAction::triggered, mPlayerWidget, [&](){mPlayerWidget->setPlayerSpeedFixed(false);});
+    mLimitPlaybackSpeed = new QAction(tr("&Limit playback speed"));
+    // Not checkable like Fix since this is also controlled through clicking on FPS and syncing currently would be bothersome
+    connect(mLimitPlaybackSpeed, &QAction::triggered, mPlayerWidget, [&](){mPlayerWidget->setPlayerSpeedLimited(!mPlayerWidget->getPlayerSpeedLimited());});
+    mFixPlaybackSpeed = new QAction(tr("&Fix playback speed"));
+    mFixPlaybackSpeed->setCheckable(true);
+    connect(mFixPlaybackSpeed, &QAction::toggled, mPlayerWidget, &Player::setPlayerSpeedFixed);
+    mSetToRealtime = new QAction(tr("&Realtime"));
+    connect(mSetToRealtime, &QAction::triggered, mPlayerWidget, [&](){mPlayerWidget->setSpeedRelativeToRealtime(1.0);});
+    mSetTo2p00 = new QAction(tr("&x2"));
+    connect(mSetTo2p00, &QAction::triggered, mPlayerWidget, [&](){mPlayerWidget->setSpeedRelativeToRealtime(2.0);});
+    mSetTo1p75 = new QAction(tr("&x1.75"));
+    connect(mSetTo1p75, &QAction::triggered, mPlayerWidget, [&](){mPlayerWidget->setSpeedRelativeToRealtime(1.75);});
+    mSetTo1p50 = new QAction(tr("&x1.5"));
+    connect(mSetTo1p50, &QAction::triggered, mPlayerWidget, [&](){mPlayerWidget->setSpeedRelativeToRealtime(1.5);});
+    mSetTo1p25 = new QAction(tr("&x1.25"));
+    connect(mSetTo1p25, &QAction::triggered, mPlayerWidget, [&](){mPlayerWidget->setSpeedRelativeToRealtime(1.25);});
+    mSetTo0p75 = new QAction(tr("&x0.75"));
+    connect(mSetTo0p75, &QAction::triggered, mPlayerWidget, [&](){mPlayerWidget->setSpeedRelativeToRealtime(0.75);});
+    mSetTo0p50 = new QAction(tr("&x0.5"));
+    connect(mSetTo0p50, &QAction::triggered, mPlayerWidget, [&](){mPlayerWidget->setSpeedRelativeToRealtime(0.5);});
+    mSetTo0p25 = new QAction(tr("&x0.25"));
+    connect(mSetTo0p25, &QAction::triggered, mPlayerWidget, [&](){mPlayerWidget->setSpeedRelativeToRealtime(0.25);});
+
+    mPlayerLooping = new QAction(tr("&Loop"));
+    mPlayerLooping->setCheckable(true);
+    connect(mPlayerLooping, &QAction::triggered, mPlayerWidget, &Player::setLooping);
     // -------------------------------------------------------------------------------------------------------
 
     QSignalMapper* signalMapper = new QSignalMapper(this);
@@ -1801,16 +1829,18 @@ void Petrack::createMenus()
     mCameraMenu = mViewMenu->addMenu(tr("&Camera"));
     mCameraMenu->addAction(mCameraLeftViewAct);
     mCameraMenu->addAction(mCameraRightViewAct);
-    mFixPlaybackSpeedMenu = mViewMenu->addMenu(tr("&Max playback speed"));
-    mFixPlaybackSpeedMenu->addAction(mFixToRealtime);
-    mFixPlaybackSpeedMenu->addAction(mFixUnlimited);
-    mFixPlaybackSpeedMenu->addAction(mFixTo2p00);
-    mFixPlaybackSpeedMenu->addAction(mFixTo1p75);
-    mFixPlaybackSpeedMenu->addAction(mFixTo1p50);
-    mFixPlaybackSpeedMenu->addAction(mFixTo1p25);
-    mFixPlaybackSpeedMenu->addAction(mFixTo0p75);
-    mFixPlaybackSpeedMenu->addAction(mFixTo0p50);
-    mFixPlaybackSpeedMenu->addAction(mFixTo0p25);
+    mViewMenu->addAction(mFixPlaybackSpeed);
+    mViewMenu->addAction(mLimitPlaybackSpeed);
+    mPlaybackSpeedMenu = mViewMenu->addMenu(tr("&Playback speed"));
+    mPlaybackSpeedMenu->addAction(mSetToRealtime);
+    mPlaybackSpeedMenu->addAction(mSetTo2p00);
+    mPlaybackSpeedMenu->addAction(mSetTo1p75);
+    mPlaybackSpeedMenu->addAction(mSetTo1p50);
+    mPlaybackSpeedMenu->addAction(mSetTo1p25);
+    mPlaybackSpeedMenu->addAction(mSetTo0p75);
+    mPlaybackSpeedMenu->addAction(mSetTo0p50);
+    mPlaybackSpeedMenu->addAction(mSetTo0p25);
+    mViewMenu->addAction(mPlayerLooping);
     mViewMenu->addSeparator();
     mViewMenu->addAction(mFitViewAct);
     mViewMenu->addAction(mFitROIAct);
@@ -2152,7 +2182,7 @@ void Petrack::setStatusFPS()
         QColor color;//(qRed(col), qGreen(col), qBlue(col));
 
         double diff = mShowFPS-mAnimation->getFPS();
-        int opacity = mPlayerWidget->getPlayerSpeedFixed() ? 128 : 20;
+        int opacity = mPlayerWidget->getPlayerSpeedLimited() ? 128 : 20;
 
         if( diff < -6 ) // very slow ==> red
             color.setRgb(200,0,0,opacity);//mStatusLabelFPS->setStyleSheet("background-color: rgba(200,0,0,20);");// border-style: outset; border-width: 1px; border-color: yellow;");//, qRgba(250,0,0,50));//Qt::yellow);
@@ -2177,27 +2207,40 @@ void Petrack::setShowFPS(double fps)
     setStatusFPS();
 }
 
-void Petrack::updateShowFPS()
-{
+/**
+ * @brief Updates the FPS shown to the User
+ *
+ * This method calculates the FPS by remembering how long
+ * it has been since it was called last time. If skipped is
+ * true, it doesn't directly updat the FPS since 2
+ * skipped frames have essentially a time delay of 0 between
+ * them, which would make calculations wonky.
+ *
+ * @param skipped True, if this is a skipped frame; default false
+ */
+void Petrack::updateShowFPS(bool skipped) {
     static QElapsedTimer lastTime;
+    static int skippedFrames = 0;
 
-    if (mPlayerWidget->getPaused()) //(!imageChanged)
+    if(skipped){
+        skippedFrames++;
+        return;
+    }
+
+    if (mPlayerWidget->getPaused())
     {
         setShowFPS(0.);
         lastTime.invalidate();
     }
     else
     {
-        //            int milliSec = updateTime.restart();
-        //            if (milliSec != 0)
-        //                mShowFPS = 1000./milliSec;
-        //            updateTime.start();
-
         if (lastTime.isValid())
         {
             if (lastTime.elapsed() > 0)
             {
-                setShowFPS(1000./lastTime.elapsed());
+                int numFrames = skippedFrames > 0 ? skippedFrames+1 : 1;
+                setShowFPS(numFrames*1000./lastTime.elapsed());
+                skippedFrames = 0;
             }
         }
         lastTime.start();
@@ -2394,7 +2437,7 @@ void Petrack::mousePressEvent(QMouseEvent *event)
     // mouse click in fps status label ?
     if( event->pos().x() >= mStatusLabelFPS->pos().x() && event->pos().x() <= mStatusLabelFPS->pos().x()+mStatusLabelFPS->width() )
     {
-        mPlayerWidget->togglePlayerSpeedFixed();
+        mPlayerWidget->togglePlayerSpeedLimited();
         setStatusFPS();
     }
 }
@@ -3123,8 +3166,16 @@ void Petrack::exportTracker(QString dest) //default = ""
 
                     for(int i=0;i<mTracker->size();++i)
                     {
-                        out << "#" << qSetFieldWidth(3) << (i+1) << qSetFieldWidth(0) << "|" << mTracker->at(i).comment() << Qt::endl;
-                        std::cout << setw(4) << (i+1) << "|" << mTracker->at(i).comment() << std::endl;
+                        auto commentSplit = mTracker->at(i).comment().split("\n", Qt::KeepEmptyParts);
+                        out << "#" << qSetFieldWidth(3) << (i+1) << qSetFieldWidth(0) << "|" << commentSplit.at(0) << Qt::endl;
+                        std::cout  << setw(4) << (i+1) << "|" << commentSplit.at(0) << std::endl;
+
+                        commentSplit.pop_front();
+                        for (const auto& line : commentSplit)
+                        {
+                            out << "#" << qSetFieldWidth(3) << " " << qSetFieldWidth(0) << "|" << line << Qt::endl;
+                            std::cout << "    |" << line << std::endl;
+                        }
                     }
                 }
                 mTrackerReal->exportTxt(out,
@@ -3445,12 +3496,12 @@ void Petrack::updateImage(bool imageChanged) // default = false (only true for n
 
     static int lastRecoFrame = -10000;
     static bool borderChangedForTracking = false;
+
     //static QTime updateTime; // ergibt die gleichen werte wie benutzte native systemroutinben!!!
 
     // need semaphore to guarrantee that updateImage only called once
     // updateValue of control automatically calls updateImage!!!
     static QSemaphore semaphore(1);
-
     if (!mImg.empty() && mImage && semaphore.tryAcquire())
     {
 
@@ -3515,7 +3566,6 @@ void Petrack::updateImage(bool imageChanged) // default = false (only true for n
     //        "==========: "
     debout << "vor  calib: " << getElapsedTime() <<endl;
 #endif
-
         if (imageChanged || swapChanged || brightContrastChanged || borderChanged || calibChanged)
             mImgFiltered = mCalibFilter->apply(mImgFiltered);
         else
@@ -3612,7 +3662,6 @@ void Petrack::updateImage(bool imageChanged) // default = false (only true for n
             debout << "vor  track: " << getElapsedTime() <<endl;
 #endif
 //            debout << "test" << endl;
-
             int anz = mTracker->track(mImgFiltered, rect, frameNum,
                                       mControlWidget->trackRepeat->isChecked(),
                                       mControlWidget->trackRepeatQual->value(), getImageBorderSize(),
@@ -3685,7 +3734,6 @@ void Petrack::updateImage(bool imageChanged) // default = false (only true for n
                 //        "==========: "
                 debout << "nach  reco: " << getElapsedTime() <<endl;
 #endif
-
                 mTracker->addPoints(persList, frameNum);
 //                debout << "reco anz: " << persList.size() << endl;
                 // folgendes lieber im Anschluss, ggf beim exportieren oder statt test direkt del:
@@ -3752,7 +3800,6 @@ void Petrack::updateImage(bool imageChanged) // default = false (only true for n
 void Petrack::updateImage(const Mat &img)
 {
     mImg = img;
-
 //    namedWindow("Test");
 //    imshow("Test",mImg);
 //    waitKey();
diff --git a/src/player.cpp b/src/player.cpp
index 5a4abb08c74b064136745a210ee00a1073a18ccb..dbf47b8760a00b6ebabd1c460d51d2129f8a6782 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include <QApplication>
 #include <QToolButton>
 #include <QVBoxLayout>
@@ -11,6 +31,8 @@
 #include "player.h"
 #include "animation.h"
 #include "petrack.h"
+#include "control.h"
+
 
 //#define TIME_MEASUREMENT
 
@@ -23,13 +45,13 @@ Player::Player(Animation *anim, QWidget *parent) : QWidget(parent)
     mPlayForwardButton = new QToolButton;
     mPlayForwardButton->setIcon(QPixmap(":/playF"));
     mPlayForwardButton->setIconSize(iconSize);
-    connect(mPlayForwardButton,SIGNAL(clicked()),this,SLOT(playForward()));
+    connect(mPlayForwardButton, &QToolButton::clicked,this, [&](){this->play(PlayerState::FORWARD);});
 
     //play backward Button
     mPlayBackwardButton = new QToolButton;
     mPlayBackwardButton->setIcon(QPixmap(":/playB"));
     mPlayBackwardButton->setIconSize(iconSize);
-    connect(mPlayBackwardButton,SIGNAL(clicked()),this,SLOT(playBackward()));
+    connect(mPlayBackwardButton, &QToolButton::clicked, this, [&](){this->play(PlayerState::BACKWARD);});
 
     //frame forward Button
     mFrameForwardButton = new QToolButton;
@@ -132,7 +154,7 @@ Player::Player(Animation *anim, QWidget *parent) : QWidget(parent)
     //mFpsLabel->setText("fps");
     mFpsLabel->setFont(f2);
     // default value
-    mPlayerSpeedFixed = false;
+    mPlayerSpeedLimited = false;
 
     //player layout
     mPlayerLayout = new QHBoxLayout();
@@ -172,24 +194,33 @@ void Player::setFPS(double fps) // default: double fps=-1.
     mAnimation->setFPS(mFpsNum->text().toDouble());
 
 }
-void Player::setPlayerSpeedFixed(bool fixed)
+void Player::setPlayerSpeedLimited(bool fixed)
 {
-    mPlayerSpeedFixed = fixed;
+    mPlayerSpeedLimited = fixed;
+}
+
+void Player::togglePlayerSpeedLimited()
+{
+    setPlayerSpeedLimited(!mPlayerSpeedLimited);
+}
+bool Player::getPlayerSpeedLimited()
+{
+    return mPlayerSpeedLimited;
 }
 
-void Player::togglePlayerSpeedFixed()
+void Player::setPlayerSpeedFixed(bool fixed)
 {
-    setPlayerSpeedFixed(!mPlayerSpeedFixed);
+    mPlayerSpeedFixed = fixed;
 }
-bool Player::getPlayerSpeedFixed()
+
+void Player::setLooping(bool looping)
 {
-    return mPlayerSpeedFixed;
+    mLooping = looping;
 }
 
-void Player::fixSpeedRelativeToRealtime(double factor)
+void Player::setSpeedRelativeToRealtime(double factor)
 {
     setFPS(mAnimation->getOriginalFPS()*factor);
-    setPlayerSpeedFixed(true);
 }
 
 void Player::setAnim(Animation *anim)
@@ -211,7 +242,7 @@ void Player::setAnim(Animation *anim)
 
 bool Player::getPaused()
 {
-    return (!mPlayF && !mPlayB);
+    return mState == PlayerState::PAUSE;
 }
 
 void Player::setSliderMax(int max)
@@ -219,6 +250,14 @@ void Player::setSliderMax(int max)
     mSlider->setMaximum(max);
 }
 
+/**
+ * @brief Processes and displays the image mImg (set in forward() or backward())
+ *
+ * Heavy lifting is in Petrack::updateImage(). This method itself handles
+ * recording and updating the value of the video-slider.
+ *
+ * @return Boolean indicating if an frame was processed and displayed
+ */
 bool Player::updateImage()
 {
     if (mImg.empty())
@@ -253,25 +292,6 @@ bool Player::updateImage()
     mSliderSet = false; // reset setSlider here because if value doesnt change than it would not be reset by skiptoframe
     qApp->processEvents(); // to allow event while playing
 
-    // slow down the player speed for extrem fast video sequences (Jiayue China or 16fps cam99 basigo grid video)
-    if (mPlayerSpeedFixed)
-    {
-        auto supposedDiff = static_cast<long long int>(1'000/mAnimation->getFPS());
-        static QElapsedTimer timer;
-        if(timer.isValid()){
-            while(!timer.hasExpired(supposedDiff)){
-                qApp->processEvents();
-            }
-        }else{
-            timer.start();
-        }
-
-        timer.start();
-        done();
-    }else
-    {
-        done();
-    }
     return true;
 }
 
@@ -285,19 +305,13 @@ bool Player::forward()
 
     bool should_be_last_frame = mAnimation->getCurrentFrameNum() == mAnimation->getSourceOutFrameNum();
 
-    mImg = mAnimation->getNextFrame();//cvarrToMat(mAnimation->getNextFrame());
+    mImg = mAnimation->getNextFrame();
     // check if animation is broken somewhere in the video
     if (mImg.empty())
     {
-        //debout << "mIplImg == NULL " << mAnimation->getCurrentFrameNum() << endl;
         if (!should_be_last_frame)
         {
             debout << "Warning: video unexpected finished." << std::endl;
-            //mSlider->setMaximum(mAnimation->getCurrentFrameNum());
-            //mMainWindow->updateWindowTitle();
-        }else
-        {
-            //debout << "Animation reached its end!" << endl;
         }
     }
 #ifdef TIME_MEASUREMENT
@@ -315,7 +329,7 @@ bool Player::backward()
     double time1 = 0.0, tstart;
     tstart = clock();
 #endif
-    mImg = mAnimation->getPreviousFrame();//cvarrToMat(mAnimation->getPreviousFrame());
+    mImg = mAnimation->getPreviousFrame();
 #ifdef TIME_MEASUREMENT
     time1 += clock() - tstart;
     time1 = time1/CLOCKS_PER_SEC;
@@ -324,6 +338,103 @@ bool Player::backward()
     return updateImage();
 }
 
+
+/**
+ * @brief Sets the state of the video player
+ *
+ * @see PlayerState
+ * @param state
+ */
+void Player::play(PlayerState state){
+    if(mState == PlayerState::PAUSE){
+        mState = state;
+        playVideo();
+    }else{
+        mState = state;
+    }
+}
+
+/**
+ * @brief Quasi MainLoop: Plays video in accordance to set frame rate
+ *
+ * This method is (indirectly) initiating calls to Player::updateImage
+ * and thus controls processing and display of video frames. The user has
+ * the option to limit playback speed, which is enforced here as well.
+ *
+ * The method is left, when the video is paused and reentered, when playing
+ * gets started again.
+ */
+void Player::playVideo(){
+    static QElapsedTimer timer;
+    int currentFrame = mAnimation->getCurrentFrameNum();
+    long long int overtime = 0;
+
+    while(mState != PlayerState::PAUSE){
+        // slow down the player speed for extrem fast video sequences (Jiayue China or 16fps cam99 basigo grid video)
+        if (mPlayerSpeedLimited || mPlayerSpeedFixed)
+        {
+            auto supposedDiff = static_cast<long long int>(1'000/mAnimation->getFPS());
+
+            if(timer.isValid()){
+                if(mPlayerSpeedFixed && mState == PlayerState::FORWARD){
+                    overtime = std::max(0LL, overtime + (timer.elapsed() - supposedDiff));
+                    if(overtime >= supposedDiff){
+                        mAnimation->skipFrame(static_cast<int>(overtime / supposedDiff));
+                        overtime = overtime % supposedDiff;
+                        currentFrame = std::min(mAnimation->getCurrentFrameNum() + 1, mAnimation->getSourceOutFrameNum());
+                    }
+                }
+
+                while(!timer.hasExpired(supposedDiff)){
+                    qApp->processEvents();
+                }
+            }
+            timer.start();
+        }else{
+            timer.invalidate();
+        }
+
+
+        switch(mState){
+        case PlayerState::FORWARD:
+            mImg = mAnimation->getFrameAtIndex(currentFrame);
+            currentFrame++;
+            break;
+        case PlayerState::BACKWARD:
+            mImg = mAnimation->getFrameAtIndex(currentFrame);
+            currentFrame--;
+            break;
+        case PlayerState::PAUSE:
+            break;
+        }
+
+        if(!updateImage()){
+            mState = PlayerState::PAUSE;
+            if( mAnimation->getCurrentFrameNum() != 0 && mAnimation->getCurrentFrameNum() != mAnimation->getSourceOutFrameNum()){
+                debout << "Warning: video unexpectedly finished." << std::endl;
+            }
+        }else{
+            if( mLooping && mMainWindow->getControlWidget()->trackOnlineCalc->checkState() == Qt::Checked)
+            {
+                QMessageBox::warning(this, "Error: No tracking while looping", "Looping and tracking are incompatible. Please disable one first.");
+                mState = PlayerState::PAUSE;
+                break;
+            }else if(mLooping)
+            {
+                if(mState == PlayerState::FORWARD && mAnimation->getCurrentFrameNum() == mAnimation->getSourceOutFrameNum())
+                {
+                    currentFrame = 0;
+                }else if(mState == PlayerState::BACKWARD && mAnimation->getCurrentFrameNum() == 0)
+                {
+                    currentFrame = mAnimation->getSourceOutFrameNum();
+                }
+            }
+        }
+    }
+
+    timer.invalidate();
+}
+
 bool Player::frameForward()
 {
     pause();
@@ -335,67 +446,30 @@ bool Player::frameBackward()
     return backward();
 }
 
-void Player::playForward()
-{
-    if (mPlayF)
-        return;
-    if (mPlayB)
-    {
-        pause();
-        playForward(); //pause();
-        return;
-    }
-    pause();
-    mPlayF = true;
-    forward();
-}
-
-void Player::playBackward()
-{
-    if (mPlayB)
-        return;
-    if (mPlayF)
-    {
-        pause();
-        playBackward(); //pause();
-        return;
-    }
-    pause();
-    mPlayB = true;
-    backward();
-}
-
 void Player::pause()
 {
-    mPlayF = false;
-    mPlayB = false;
+    mState = PlayerState::PAUSE;
     mMainWindow->setShowFPS(0.);
 }
 
+/**
+ * @brief Toggles pause/play for use via spacebar
+ */
 void Player::togglePlayPause()
 {
-    static bool lastPlayF = true; // muss entgegen dem in setAnim() gesetzt werden von playF
+    static PlayerState lastState;
 
-    if (mPlayF || mPlayB)
+    if (mState != PlayerState::PAUSE)
     {
-        lastPlayF = mPlayF;
+        lastState = mState;
         pause();
     }
-    else if (lastPlayF)
-        playForward();
     else
-        playBackward();
+    {
+        play(lastState);
+    }
 }
 
-bool Player::done()
-{
-    qApp->processEvents();
-    if (mPlayF)
-        return forward();
-    if (mPlayB)
-        return backward();
-    return false;
-}
 void Player::recStream()
 {
     if (mAnimation->isCameraLiveStream() || mAnimation->isVideo() || mAnimation->isImageSequence() || mAnimation->isStereoVideo())
diff --git a/src/qtColorTriangle.cpp b/src/qtColorTriangle.cpp
index 6bf017dc73802efdacb7749f26116f9fd22b796c..7d6a71b315cfd9d709aa60de3e836da27c53e623 100644
--- a/src/qtColorTriangle.cpp
+++ b/src/qtColorTriangle.cpp
@@ -1,17 +1,17 @@
 /****************************************************************************
-** 
+**
 ** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
-** 
+**
 ** This file is part of a Qt Solutions component.
 **
-** Commercial Usage  
+** Commercial Usage
 ** Licensees holding valid Qt Commercial licenses may use this file in
 ** accordance with the Qt Solutions Commercial License Agreement provided
 ** with the Software or, alternatively, in accordance with the terms
 ** contained in a written agreement between you and Nokia.
-** 
+**
 ** GNU Lesser General Public License Usage
 ** Alternatively, this file may be used under the terms of the GNU Lesser
 ** General Public License version 2.1 as published by the Free Software
@@ -19,29 +19,29 @@
 ** packaging of this file.  Please review the following information to
 ** ensure the GNU Lesser General Public License version 2.1 requirements
 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-** 
+**
 ** In addition, as a special exception, Nokia gives you certain
 ** additional rights. These rights are described in the Nokia Qt LGPL
 ** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
 ** package.
-** 
-** GNU General Public License Usage 
+**
+** GNU General Public License Usage
 ** Alternatively, this file may be used under the terms of the GNU
 ** General Public License version 3.0 as published by the Free Software
 ** Foundation and appearing in the file LICENSE.GPL included in the
 ** packaging of this file.  Please review the following information to
 ** ensure the GNU General Public License version 3.0 requirements will be
 ** met: http://www.gnu.org/copyleft/gpl.html.
-** 
+**
 ** Please note Third Party Software included with Qt Solutions may impose
 ** additional restrictions and it is the user's responsibility to ensure
 ** that they have met the licensing requirements of the GPL, LGPL, or Qt
 ** Solutions Commercial license and the relevant license of the Third
 ** Party Software they are using.
-** 
+**
 ** If you are unsure which license is appropriate for your use, please
 ** contact Nokia at qt-info@nokia.com.
-** 
+**
 ****************************************************************************/
 
 // siehe fuer Doku: http://docs.huihoo.com/qt/solutions/4/qtcolortriangle/qtcolortriangle.html
diff --git a/src/recognition.cpp b/src/recognition.cpp
index c9834fe5b60fd3f6753ead4ed9aa9062b1e91f08..0fbb7a84249a3e8d83a603074f04c68a853c641f 100644
--- a/src/recognition.cpp
+++ b/src/recognition.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include <QPointF>
 #include <QRect>
 #if not CV_MAJOR_VERION == 4
@@ -774,9 +794,9 @@ void findMultiColorMarker(Mat &img, QList<TrackPoint> *crossList, Control *contr
                     // - set the offset of subImg with regards to ROI //(ROI to original image is archieved later in the code for all methods)
                     // - add the functionality of autocorrection
                     // - deal with functionality of ignore/not ignore heads without identified ArucoMarker
-                    if (ignoreWithoutMarker && lengthini<crossList->size()) // if CodeMarker-Call returns crossList containing a new element (identified the ArucoMarker)
+                    if (ignoreWithoutMarker && lengthini!=crossList->size()) // if CodeMarker-Call returns crossList containing a new element (identified the ArucoMarker)
                     {
-                        size_t ii = crossList->size()-1;
+                        auto ii = crossList->size()-1;
                         if (autoCorrect && !autoCorrectOnlyExport)
                         {
                             moveDir = autoCorrectColorMarker(boxImageCentre, controlWidget);
@@ -785,24 +805,30 @@ void findMultiColorMarker(Mat &img, QList<TrackPoint> *crossList, Control *contr
                         {
                             moveDir = Vec2F(0, 0);
                         }
-                        (*crossList)[ii] = (*crossList)[ii] + (TrackPoint(Vec2F(cropRect.x, cropRect.y) + moveDir));
+                        (*crossList)[ii].setCol(col);
+                        (*crossList)[ii].setColPoint(Vec2F(box.center.x, box.center.y));
+                        (*crossList)[ii] = (*crossList)[ii] + (Vec2F(cropRect.x, cropRect.y) + moveDir);
                     }
                     else if(!ignoreWithoutMarker && (lengthini==crossList->size())) // in case ignoreWithoutMarker is checked and CodeMarker-Call returns empty crossList (could not identify a marker) the center of the smallest rectangle around the colorblobb is used as position
                     {
+                        offsetCropRect2Roi.setX(0); // set to zero as cooridinates are directly used from cropRect
+                        offsetCropRect2Roi.setY(0);
+                        CodeMarkerItem* codeMarkerItem = controlWidget->getMainWindow()->getCodeMarkerItem();
+                        codeMarkerItem->setOffsetCropRect2Roi(offsetCropRect2Roi);
+
                         if (autoCorrect && !autoCorrectOnlyExport)
                         {
                             moveDir = autoCorrectColorMarker(boxImageCentre, controlWidget);
-
-                            crossList->append(TrackPoint(Vec2F(box.center.x, box.center.y)+moveDir, 100, Vec2F(box.center.x, box.center.y), col)); // 100 beste qualitaet
                         }
                         else
                         {
-                            crossList->append(TrackPoint(Vec2F(box.center.x, box.center.y), 90, Vec2F(box.center.x, box.center.y), col)); // 100 beste qualitaet
+                            moveDir = Vec2F(0,0);
                         }
+                        crossList->append(TrackPoint(Vec2F(box.center.x, box.center.y) + moveDir, 90, Vec2F(box.center.x, box.center.y), col)); // 100 beste qualitaet
                     }
                     else if(!ignoreWithoutMarker && (crossList->size()!=lengthini)) // in case ignoreWithoutMarker is checked and CodeMarker-Call returns non-empty crossList (could identify a marker)
                     {
-                        size_t ii = crossList->size()-1;
+                        auto ii = crossList->size()-1;
                         if (autoCorrect && !autoCorrectOnlyExport)
                         {
                             moveDir = autoCorrectColorMarker(boxImageCentre, controlWidget);
@@ -811,7 +837,9 @@ void findMultiColorMarker(Mat &img, QList<TrackPoint> *crossList, Control *contr
                         {
                            moveDir = Vec2F(0, 0);
                         }
-                        (*crossList)[ii] = (*crossList)[ii] + (TrackPoint(Vec2F(cropRect.x, cropRect.y) + moveDir));
+                        (*crossList)[ii].setCol(col);
+                        (*crossList)[ii].setColPoint(Vec2F(box.center.x, box.center.y));
+                        (*crossList)[ii] = (*crossList)[ii] + (Vec2F(cropRect.x, cropRect.y) + moveDir);
                     }
 
                 }
@@ -1120,10 +1148,6 @@ void findCodeMarker(Mat &img, QList<TrackPoint> *crossList, Control *controlWidg
         if (recoMethod == 5)   // for usage of codemarker with MulticolorMarker
         {
             QRect rect(0,0, img.rows, img.cols);
-//            QPointF p1 = mainWindow->getImageItem()->getCmPerPixel(rect.x(),rect.y(),controlWidget->mapDefaultHeight->value()),
-//                    p2 = mainWindow->getImageItem()->getCmPerPixel(rect.x()+rect.width(),rect.y(),controlWidget->mapDefaultHeight->value()),
-//                    p3 = mainWindow->getImageItem()->getCmPerPixel(rect.x(),rect.y()+rect.height(),controlWidget->mapDefaultHeight->value()),
-//                    p4 = mainWindow->getImageItem()->getCmPerPixel(rect.x()+rect.width(),rect.y()+rect.height(),controlWidget->mapDefaultHeight->value());
 
             // from Aruco Documentation values 0 + 4 all info is considered (low performance issues expected due to small image size)
             minMarkerPerimeterRate = 0.02;
@@ -1807,4 +1831,3 @@ cv::Ptr<cv::aruco::Dictionary> getDictMip36h12()
 
     return dictionary;
 }
-
diff --git a/src/recognitionRoiItem.cpp b/src/recognitionRoiItem.cpp
index cb03450e31c2a1d0acbdfacd18744c1f5598821a..cf20b964f28bae992f05ed13fea15866cdfc6f3d 100644
--- a/src/recognitionRoiItem.cpp
+++ b/src/recognitionRoiItem.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include <QtWidgets>
 
 #include "petrack.h"
diff --git a/src/stereoAviFile.cpp b/src/stereoAviFile.cpp
index 5af0ac5a0fe51bc9a8978f0f88e8eb96673faf81..c6f7d79fde30c25bfc1faa0b4ae20d7028a01fb1 100644
--- a/src/stereoAviFile.cpp
+++ b/src/stereoAviFile.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef STEREO_DISABLED
 #include <stdio.h>
 
diff --git a/src/stereoContext.cpp b/src/stereoContext.cpp
index 11c4e2c8125148ad07ce025b432d5470f8f0c117..d76e642178dfcd1b5a72fd5a1ff41f7b95103f39 100644
--- a/src/stereoContext.cpp
+++ b/src/stereoContext.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include <QDir>
 
 #include "stereoContext.h"
diff --git a/src/stereoItem.cpp b/src/stereoItem.cpp
index c3c78febaf97a16f729dcc450a9bd3863c9b251a..c8d5f48d75c95e8d291ad109f02407318e33f641 100644
--- a/src/stereoItem.cpp
+++ b/src/stereoItem.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include <QtWidgets>
 
 #include "petrack.h"
diff --git a/src/stereoWidget.cpp b/src/stereoWidget.cpp
index a77b06e8de5772956187a54ccb5adf6044f1af09..bdeb019d95ed70644d5bb425523a1b0479f21fb2 100644
--- a/src/stereoWidget.cpp
+++ b/src/stereoWidget.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include "stereoWidget.h"
 
 StereoWidget::StereoWidget(QWidget *parent)
diff --git a/src/swapFilter.cpp b/src/swapFilter.cpp
index f2bedbd5ce10d0ebe2c2d9498017dd9147cbc370..e3fefa966b12d5e6ff7c1f0f949c9abef2eb5c2d 100644
--- a/src/swapFilter.cpp
+++ b/src/swapFilter.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include "swapFilter.h"
 #include "helper.h"
 
diff --git a/src/tracker.cpp b/src/tracker.cpp
index e7d00ca68bdaa7b3aeb8643354d4c46dfd643dad..7807a33313b7e2f73d74a05c696aaadbe63f4b34 100644
--- a/src/tracker.cpp
+++ b/src/tracker.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include "opencv2/opencv.hpp"
 
 #include <time.h>
@@ -853,23 +873,50 @@ void Tracker::delPointROI()
 
 
 }
-bool Tracker::editTrackPersonComment(const Vec2F& p, int frame, QSet<int> onlyVisible)
-{
-    int i;
 
-    for (i = 0; i < size(); ++i) // ueber TrackPerson
-        if (((onlyVisible.empty()) || (onlyVisible.contains(i))) && (at(i).trackPointExist(frame) && (at(i).trackPointAt(frame).distanceToPoint(p) < mMainWindow->getHeadSize(NULL, i, frame)/2.))) // war: MIN_DISTANCE)) // 30 ist abstand zwischen kopfen
+/**
+ * @brief Editing the comment of a TrackPerson
+ *
+ * Allows editing the comment of a TrackPerson in a new Dialog. When a new dialog gets opened, it automatically
+ * appends 'Frame {\p frame}: ' to the dialog, if no comment for the frame exists.
+ *
+ * @param p position the user clicked
+ * @param frame current frame number
+ * @param onlyVisible list of visible persons
+ * @return if a comment has been saved
+ */
+bool Tracker::editTrackPersonComment(const Vec2F& p, int frame, const QSet<int>& onlyVisible)
+{
+    for (int i = 0; i < size(); ++i) // ueber TrackPerson
+    {
+        if (((onlyVisible.empty()) || (onlyVisible.contains(i))) && (at(i).trackPointExist(frame) &&
+                                                                     (at(i).trackPointAt(frame).distanceToPoint(p) <
+                                                                      mMainWindow->getHeadSize(nullptr, i, frame) /
+                                                                      2.))) // war: MIN_DISTANCE)) // 30 ist abstand zwischen kopfen
         {
-            bool ok;
-            QString comment = QInputDialog::getText(mMainWindow,QObject::tr("Add Comment"),QObject::tr("Comment:"),
-                                                    QLineEdit::Normal, at(i).comment() , &ok);
-            if (ok)
+            QString displayedComment = at(i).comment();
+            QString framePrefix = "Frame " + QString::number(frame, 'g', 5) + ": ";
+
+            if (displayedComment.isEmpty())
             {
-                if(comment.isEmpty())
-                {
-                    int ret = QMessageBox::warning(mMainWindow, QObject::tr("Empty comment"), QObject::tr("Are you sure you want to save an empty comment?"), QMessageBox::Save | QMessageBox::Cancel);
-                    if( ret == QMessageBox::Cancel )
-                    {
+                displayedComment.append(framePrefix);
+            }
+            else if (!displayedComment.contains(framePrefix))
+            {
+                displayedComment.append("\n" + framePrefix);
+            }
+
+            bool ok = false;
+            QString comment = QInputDialog::getMultiLineText(mMainWindow, QObject::tr("Add Comment"),
+                                                             QObject::tr("Comment:"),
+                                                             displayedComment, &ok);
+
+            if (ok) {
+                if (comment.isEmpty()) {
+                    int ret = QMessageBox::warning(mMainWindow, QObject::tr("Empty comment"),
+                                                   QObject::tr("Are you sure you want to save an empty comment?"),
+                                                   QMessageBox::Save | QMessageBox::Cancel);
+                    if (ret == QMessageBox::Cancel) {
                         return false;
                     }
                 }
@@ -877,6 +924,7 @@ bool Tracker::editTrackPersonComment(const Vec2F& p, int frame, QSet<int> onlyVi
                 return true;
             }
         }
+    }
     return false;
 }
 
diff --git a/src/trackerItem.cpp b/src/trackerItem.cpp
index 01520183fef485647c2217021ca32b6fad3c0b4f..4ad31fca12577ad18d0bfc388ed644a0bd86a087 100644
--- a/src/trackerItem.cpp
+++ b/src/trackerItem.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include <QtWidgets>
 #include <QInputDialog>
 
diff --git a/src/trackerReal.cpp b/src/trackerReal.cpp
index b94c46fc7a3d236d48a132a42dadc08a5eb5ff0b..892be0165675f136c69c789d30be76c3112a04dc 100644
--- a/src/trackerReal.cpp
+++ b/src/trackerReal.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include "trackerReal.h"
 #include "helper.h"
 #include "recognition.h"
diff --git a/src/trackingRoiItem.cpp b/src/trackingRoiItem.cpp
index 6a0a8de7b24754919456f026777140b92a7246d4..d010e7d7824e949e7a3deeae92afbf84483ad3ca 100644
--- a/src/trackingRoiItem.cpp
+++ b/src/trackingRoiItem.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include <QtWidgets>
 
 #include "petrack.h"
diff --git a/src/vector.cpp b/src/vector.cpp
index 7ad68e27e94f86295a87f82271da5b6015d1115c..1b9fc3ea47c51dbfd0fe0a4a7eba600a42ec7216 100644
--- a/src/vector.cpp
+++ b/src/vector.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include "opencv2/opencv.hpp"
 
 #include <QPointF>
diff --git a/src/view.cpp b/src/view.cpp
index f865374ea2229a17db19f9884af88661c3f0834b..47dcc792a119b3f49a296418db92412f1b4c9284 100644
--- a/src/view.cpp
+++ b/src/view.cpp
@@ -1,4 +1,24 @@
-#include <QtWidgets>
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
+#include <QtWidgets>
 
 #include <cmath>
 
@@ -41,6 +61,7 @@ GraphicsView::GraphicsView(ViewWidget *viewWidget)
 //             setDragMode(QGraphicsView::ScrollHandDrag);
 //     }
 
+
 void GraphicsView::wheelEvent(QWheelEvent * event)
 {
     QPoint numDegrees = event->angleDelta() / 8;
@@ -179,9 +200,9 @@ void GraphicsView::mousePressEvent(QMouseEvent *event)
 {
 
     if(event->modifiers() & Qt::ShiftModifier){
-        emit setColorEvent(event->pos(), this);
+        emit setColorEvent();
     }else{
-        emit colorSelected(event->pos(), this);
+        emit colorSelected();
     }
     QGraphicsView::mousePressEvent(event);
 }
diff --git a/src/whitebalance.cpp b/src/whitebalance.cpp
deleted file mode 100644
index 8258cd33d69d2db50b86509300d4cf5fa6812d56..0000000000000000000000000000000000000000
--- a/src/whitebalance.cpp
+++ /dev/null
@@ -1,339 +0,0 @@
-/* ============================================================
- *
- * This file is a part of digiKam project
- * http://www.digikam.org
- *
- * Date        : 2007-16-01
- * Description : white balance color correction.
- *
- * Copyright (C) 2007 by Gilles Caulier <caulier dot gilles at gmail dot com>
- *
- * Some parts are inspired from RawPhoto implementation copyrighted
- * 2004-2005 by Pawel T. Jochym <jochym at ifj edu pl>
- *
- * This program is free software; you can redistribute it
- * and/or modify it under the terms of the GNU General
- * Public License as published by the Free Software Foundation;
- * either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * ============================================================ */
-
-// C++ includes.
-
-#include <cmath>
-//#include "math.h"
-
-// Qt includes.
-
-#include <QColor>
-
-// Local includes.
-
-//#include "imagehistogram.h"
-//#include "blackbody.h"
-#include "whitebalance.h"
-
-class WhiteBalancePriv
-{
-
-public:
-
-    WhiteBalancePriv()
-    {
-        // Obsolete in algorithm since over/under exposure indicators
-        // are implemented directly with preview widget.
-        WBind       = false;
-        overExp     = false;
-
-        clipSat     = true;
-        mr          = 1.0;
-        mg          = 1.0;
-        mb          = 1.0;
-        BP          = 0;
-
-        // Neutral color temperature settings.
-        dark        = 0.5;
-        black       = 0.0;
-        exposition  = 0.0;
-        gamma       = 1.0;
-        saturation  = 1.0;
-        green       = 1.2;
-        temperature = 4.750;
-    }
-
-    bool   clipSat;
-    bool   overExp;
-    bool   WBind;
-
-    double saturation;
-    double temperature;
-    double gamma;
-    double black;
-    double exposition;
-    double dark;
-    double green;
-
-    int    BP;
-    int    WP;
-
-    uint   rgbMax;
-
-    float  curve[65536];
-    float  mr;
-    float  mg;
-    float  mb;
-};
-
-WhiteBalance::WhiteBalance(bool sixteenBit)
-{
-    d = new WhiteBalancePriv;
-    d->WP     = sixteenBit ? 65536 : 256;
-    d->rgbMax = sixteenBit ? 65536 : 256;
-}
-
-WhiteBalance::~WhiteBalance()
-{
-    delete d;
-}
-
-void WhiteBalance::whiteBalance(uchar *data, int width, int height, bool sixteenBit,
-                                double black, double exposition,
-                                double temperature, double green, double dark,
-                                double gamma, double saturation)
-{
-    d->temperature = temperature;
-    d->green       = green;
-    d->dark        = dark;
-    d->black       = black;
-    d->exposition  = exposition;
-    d->gamma       = gamma;
-    d->saturation  = saturation;
-
-    // Set final lut.
-    setRGBmult();
-    d->mr = d->mb = 1.0;
-    if (d->clipSat) d->mg = 1.0;
-    setLUTv();
-    setRGBmult();
-
-    // Apply White balance adjustments.
-    adjustWhiteBalance(data, width, height, sixteenBit);
-}
-
-void WhiteBalance::autoWBAdjustementFromColor(const QColor &tc, double &temperature, double &green)
-{
-    // Calculate Temperature and Green component from color picked.
-
-    int l, r, m;
-    double sR, sG, sB, mRB, t;
-
-    t   = qMax( qMax(tc.red(), tc.green()), tc.blue());
-    sR  = tc.red()   / t;
-    sG  = tc.green() / t;
-    sB  = tc.blue()  / t;
-    mRB = sR / sB;
-
-    debout << "Sums:  R:" << sR << " G:" << sG  << " B:" << sB << std::endl;
-
-    l = 0;
-    r = sizeof(blackBodyWhiteBalance)/(sizeof(float)*3);
-    m = (r + l) / 2;
-
-    for (l = 0, r = sizeof(blackBodyWhiteBalance)/(sizeof(float)*3), m = (l+r)/2 ; r-l > 1 ; m = (l+r)/2)
-    {
-        if (blackBodyWhiteBalance[m][0]/blackBodyWhiteBalance[m][2] > mRB)
-            l = m;
-        else
-            r = m;
-
-        debout << "L,M,R:  " << l << " " << m << " " << r
-                 << " blackBodyWhiteBalance[m]=:" << blackBodyWhiteBalance[m][0]/blackBodyWhiteBalance[m][2]
-                 << std::endl;
-    }
-
-    debout << "Temperature (K):" << m*10.0+2000.0 << std::endl;
-
-    t = (blackBodyWhiteBalance[m][1]/blackBodyWhiteBalance[m][0]) / (sG/sR);
-
-    debout << "Green component:" << t << std::endl;
-
-    temperature = m*10.0+2000.0;
-    green       = t;
-}
-
-void WhiteBalance::autoExposureAdjustement(uchar* /*data*/, int /*width*/, int /*height*/, bool /*sb*/,
-                                           double &/*black*/, double &/*expo*/)
-{
-    // Create an histogram of original image.
-
-//     ImageHistogram *histogram = new ImageHistogram(data, width, height, sb);
-
-//     // Calculate optimal exposition and black level
-
-//     int    i;
-//     double sum, stop;
-//     uint   rgbMax = sb ? 65536 : 256;
-
-//     // Cutoff at 0.5% of the histogram.
-
-//     stop = width * height / 200;
-
-//     for (i = rgbMax, sum = 0; (i >= 0) && (sum < stop); i--)
-//         sum += histogram->getValue(Digikam::ImageHistogram::ValueChannel, i);
-
-//     expo = -log((float)(i+1) / rgbMax) / log(2);
-//     debout << "White level at:" << i << endl;
-
-//     for (i = 1, sum = 0; (i < (int)rgbMax) && (sum < stop); i++)
-//         sum += histogram->getValue(Digikam::ImageHistogram::ValueChannel, i);
-
-//     black = (double)i / rgbMax;
-//     black /= 2;
-
-//     debout << "Black:" << black << "  Exposition:" << expo << endl;
-
-//     delete histogram;
-}
-
-void WhiteBalance::setRGBmult()
-{
-    int   t;
-    float mi;
-
-    if ( d->temperature > 7.0 ) d->temperature = 7.0;
-
-    t     = (int)(d->temperature * 100.0 - 200.0);
-    d->mr  = 1.0 / blackBodyWhiteBalance[t][0];
-    d->mg  = 1.0 / blackBodyWhiteBalance[t][1];
-    d->mb  = 1.0 / blackBodyWhiteBalance[t][2];
-    d->mg *= d->green;
-
-    // Normalize to at least 1.0, so we are not dimming colors only bumping.
-    mi    = qMin(d->mr, d->mg);
-    mi    = qMin(mi, d->mb);
-    d->mr /= mi;
-    d->mg /= mi;
-    d->mb /= mi;
-}
-
-void WhiteBalance::setLUTv()
-{
-    double b = d->mg * pow(2, d->exposition);
-    d->BP    = (uint)(d->rgbMax * d->black);
-    d->WP    = (uint)(d->rgbMax / b);
-
-    if (d->WP - d->BP < 1) d->WP = d->BP + 1;
-
-    debout << "T(K): " << d->temperature
-             << " => R:" << d->mr
-             << " G:"    << d->mg
-             << " B:"    << d->mb
-             << " BP:"   << d->BP
-             << " WP:"   << d->WP
-             << std::endl;
-
-    d->curve[0] = 0;
-
-    // We will try to reproduce the same Gamma effect here than BCG tool.
-    double gamma;
-    if (d->gamma >= 1.0)
-        gamma = 0.335*(2.0-d->gamma) + 0.665;
-    else
-        gamma = 1.8*(2.0-d->gamma) - 0.8;
-
-    for (int i = 1; i < (int)d->rgbMax; i++)
-    {
-        float x      = (float)(i - d->BP)/(d->WP - d->BP);
-        d->curve[i]  = (i < d->BP) ? 0 : (d->rgbMax-1) * pow((double) x, gamma);
-        d->curve[i] *= (1 - d->dark * exp(-x * x / 0.002));
-        d->curve[i] /= (float)i;
-    }
-}
-
-void WhiteBalance::adjustWhiteBalance(uchar *data, int width, int height, bool sixteenBit)
-{
-    uint i, j;
-
-    if (!sixteenBit)        // 8 bits image.
-    {
-        uchar red, green, blue;
-        uchar *ptr = data;
-
-        for (j = 0 ; j < (uint)(width*height) ; j++)
-        {
-            int v, rv[3];
-
-            blue  = ptr[0];
-            green = ptr[1];
-            red   = ptr[2];
-
-            rv[0] = (int)(blue  * d->mb);
-            rv[1] = (int)(green * d->mg);
-            rv[2] = (int)(red   * d->mr);
-            v = qMax(rv[0], rv[1]);
-            v = qMax(v, rv[2]);
-
-            if (d->clipSat) v = qMin(v, (int)d->rgbMax-1);
-            i = v;
-
-            ptr[0] = (uchar)pixelColor(rv[0], i, v);
-            ptr[1] = (uchar)pixelColor(rv[1], i, v);
-            ptr[2] = (uchar)pixelColor(rv[2], i, v);
-            ptr += 4;
-        }
-    }
-    else               // 16 bits image.
-    {
-        unsigned short red, green, blue;
-        unsigned short *ptr = (unsigned short *)data;
-
-        for (j = 0 ; j < (uint)(width*height) ; j++)
-        {
-            int v, rv[3];
-
-            blue  = ptr[0];
-            green = ptr[1];
-            red   = ptr[2];
-
-            rv[0] = (int)(blue  * d->mb);
-            rv[1] = (int)(green * d->mg);
-            rv[2] = (int)(red   * d->mr);
-            v     = qMax(rv[0], rv[1]);
-            v     = qMax(v, rv[2]);
-
-            if (d->clipSat) v = qMin(v, (int)d->rgbMax-1);
-            i = v;
-
-            ptr[0] = pixelColor(rv[0], i, v);
-            ptr[1] = pixelColor(rv[1], i, v);
-            ptr[2] = pixelColor(rv[2], i, v);
-            ptr += 4;
-        }
-    }
-}
-
-unsigned short WhiteBalance::pixelColor(int colorMult, int index, int value)
-{
-    int r = (d->clipSat && colorMult > (int)d->rgbMax) ? d->rgbMax : colorMult;
-
-    if (value > d->BP && d->overExp && value > d->WP)
-    {
-        if (d->WBind)
-           r = (colorMult > d->WP) ? 0 : r;
-        else
-           r = 0;
-    }
-
-    int x = (int)((index - d->saturation*(index - r)) * d->curve[index]);
-    return( (unsigned short)(x<0?0:((x>((int)(d->rgbMax-1)))?((int)(d->rgbMax-1)):x)));
-
-// #define CLAMP(x,l,u) ((x)<(l)?(l):((x)>(u)?(u):(x)))
-//     return( (unsigned short)CLAMP((int)((index - d->saturation*(index - r)) * d->curve[index]),
-//                                   0, (int)(d->rgbMax-1)) );
-}
diff --git a/tests/regression_test/tests/Person_txt.py b/tests/regression_test/tests/Person_txt.py
index 80b2dfca56573a1cac7501426108bba56dc1db7c..f25f74aaefda71051bb1348518f342be410ccc81 100644
--- a/tests/regression_test/tests/Person_txt.py
+++ b/tests/regression_test/tests/Person_txt.py
@@ -1,3 +1,22 @@
+#
+# PeTrack - Software for tracking pedestrians movement in videos
+# Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+# Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+# Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
+#
 class Point:
 
     def __init__(self, frame, x, y, z):
diff --git a/tests/regression_test/tests/conftest.py b/tests/regression_test/tests/conftest.py
index 80e7866da1b9e8909bc73c47e4639629c56302bd..149c6142148230dd7082433f368b25f26d4a56b9 100644
--- a/tests/regression_test/tests/conftest.py
+++ b/tests/regression_test/tests/conftest.py
@@ -1,3 +1,22 @@
+#
+# PeTrack - Software for tracking pedestrians movement in videos
+# Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+# Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+# Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
+#
 import pytest
 import subprocess
 
diff --git a/tests/regression_test/tests/test_tracker_txt.py b/tests/regression_test/tests/test_tracker_txt.py
index c045215124734211bf02a0be5122e57a4f1a1bc8..a7beabf747eda4309345f991a53e75a7ca92f60d 100644
--- a/tests/regression_test/tests/test_tracker_txt.py
+++ b/tests/regression_test/tests/test_tracker_txt.py
@@ -1,3 +1,22 @@
+#
+# PeTrack - Software for tracking pedestrians movement in videos
+# Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+# Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+# Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
+#
 import copy
 
 from pytest import approx
diff --git a/tests/unit_test/main.cpp b/tests/unit_test/main.cpp
index 36766ceae0863befcb3ed9054e8cec3db4f3e1d3..db7f294c2596d9502b3314e006c6d7dfe6b3d795 100644
--- a/tests/unit_test/main.cpp
+++ b/tests/unit_test/main.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #define CATCH_CONFIG_RUNNER
 #include <catch2/catch.hpp>
 
diff --git a/tests/unit_test/tst_apptest.cpp b/tests/unit_test/tst_apptest.cpp
index 3454ca5f815341731990991df36a081a5320c8c3..0295d5dbb542c6c87c2874f84abd2505843eb507 100644
--- a/tests/unit_test/tst_apptest.cpp
+++ b/tests/unit_test/tst_apptest.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include <catch2/catch.hpp>
 
 #include <iostream>
diff --git a/tests/unit_test/tst_control.cpp b/tests/unit_test/tst_control.cpp
index 70291d4d1b8b440f071a3d8e0d0dcd4dbacce0d2..3c2e30777a6b306dd24465e77b106b11530a0377 100644
--- a/tests/unit_test/tst_control.cpp
+++ b/tests/unit_test/tst_control.cpp
@@ -1,3 +1,23 @@
+/*
+ * PeTrack - Software for tracking pedestrians movement in videos
+ * Copyright (C) 2010-2020 Forschungszentrum Jülich GmbH,
+ * Maik Boltes, Juliane Adrian, Ricardo Martin Brualla, Arne Graf, Paul Häger, Daniel Hillebrand,
+ * Deniz Kilic, Paul Lieberenz, Daniel Salden, Tobias Schrödter, Ann Katrin Seemann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #include <catch2/catch.hpp>
 
 #include <iostream>
@@ -24,22 +44,22 @@ void checkSelectedColor(Control* con, bool invHue, int toHue, int fromHue,
     QColor fromColor = con->getColorPlot()->getMapItem()->getActMapFromColor();
 
     // Hue
-    REQUIRE(toColor.hue() == toHue);
-    REQUIRE(fromColor.hue() == fromHue);
+    REQUIRE(toColor.hue() == Approx(toHue).margin(1));
+    REQUIRE(fromColor.hue() == Approx(fromHue).margin(1));
 
     // Saturation
-    REQUIRE(toColor.saturation() == toSat);
-    REQUIRE(fromColor.saturation() == fromSat);
+    REQUIRE(toColor.saturation() == Approx(toSat).margin(1));
+    REQUIRE(fromColor.saturation() == Approx(fromSat).margin(1));
 
     // Value
-    REQUIRE(toColor.value() == toVal);
-    REQUIRE(fromColor.value() == fromVal);
+    REQUIRE(toColor.value() == Approx(toVal).margin(1));
+    REQUIRE(fromColor.value() == Approx(fromVal).margin(1));
 
     // Sliders
-    REQUIRE(con->mapX->value() == mapX);
-    REQUIRE(con->mapW->value() == mapW);
-    REQUIRE(con->mapY->value() == mapY);
-    REQUIRE(con->mapH->value() == mapH);
+    REQUIRE(con->mapX->value() == Approx(mapX).margin(2));
+    REQUIRE(con->mapW->value() == Approx(mapW).margin(2));
+    REQUIRE(con->mapY->value() == Approx(mapY).margin(2));
+    REQUIRE(con->mapH->value() == Approx(mapH).margin(2));
 }
 
 
@@ -68,12 +88,13 @@ SCENARIO("I open PeTrack with a red image", "[ui][config]")
         AND_GIVEN("I shift+click on one point of the (red) image"){
             eventList.clear();
             eventList.addMouseClick(Qt::MouseButton::LeftButton, Qt::KeyboardModifier::ShiftModifier, viewCenter);
+            eventList.addMouseClick(Qt::MouseButton::LeftButton, Qt::KeyboardModifier::ShiftModifier, viewCenter);
 
-            QSignalSpy setColorSpy{pet.getView(), SIGNAL(setColorEvent(QPoint, GraphicsView*))};
+            QSignalSpy setColorSpy{pet.getView(), &GraphicsView::setColorEvent};
             REQUIRE(setColorSpy.isValid());
             setColorSpy.wait(20);
             eventList.simulate(pet.getView()->viewport());
-            REQUIRE(setColorSpy.count() == 1);
+            REQUIRE(setColorSpy.count() == 2);
 
             THEN("This pixel and its sourroundings get selected as new color"){
                 // Red, so we need Inverse Hue
@@ -141,6 +162,7 @@ SCENARIO("I open PeTrack with a red image", "[ui][config]")
 
             QTestEventList eventList;
             eventList.addMouseClick(Qt::MouseButton::LeftButton, Qt::KeyboardModifier::ShiftModifier, viewCenter);
+            eventList.addMouseClick(Qt::MouseButton::LeftButton, Qt::KeyboardModifier::ShiftModifier, viewCenter);
             eventList.simulate(pet.getView()->viewport());
 
             REQUIRE(!con->getColorPlot()->getMapItem()->getActMapInvHue());
@@ -165,6 +187,7 @@ SCENARIO("I open PeTrack with a red image", "[ui][config]")
                 pet.updateImage(pinkTestImage);
 
                 QTestEventList eventList;
+                eventList.addMouseMove(viewCenter);
                 eventList.addMouseClick(Qt::MouseButton::LeftButton, Qt::KeyboardModifier::NoModifier, viewCenter);
                 eventList.simulate(pet.getView()->viewport());
 
@@ -179,17 +202,21 @@ SCENARIO("I open PeTrack with a red image", "[ui][config]")
             newTestImage.at<cv::Vec3b>(cv::Point(25,25)) = cv::Vec3b(100,255,255);
             cv::cvtColor(newTestImage, newTestImage, cv::COLOR_HSV2BGR);
             pet.updateImage(newTestImage);
+            QMouseEvent event {QEvent::HoverMove, QPoint(25, 25), Qt::NoButton, Qt::NoButton, Qt::NoModifier};
 
-            QTestEventList eventList;
             QPointF pointOnScene = pet.getImageItem()->mapToScene(QPoint(25, 25));
             QPoint pointOnViewport = pet.getView()->mapFromScene(pointOnScene);
+
+            // Only after a click the hover event setting mMousePosOnImage gets fired. Focus?
+            eventList.addMouseClick(Qt::MouseButton::LeftButton, Qt::KeyboardModifier::ShiftModifier,
+                                    pointOnViewport);
             eventList.addMouseClick(Qt::MouseButton::LeftButton, Qt::KeyboardModifier::ShiftModifier,
                                     pointOnViewport);
             eventList.simulate(pet.getView()->viewport());
 
             THEN("I get a color selection fitting this single pixel"){
                 bool invHue = false;
-                // Upper Bound Hue 200 + 5 -> 105 Lower Bound: 200 - 5 -> 95
+                // Upper Bound Hue 200 + 5 -> 205 Lower Bound: 200 - 5 -> 195
                 int fromHue = 195, toHue = 205;
                 // mapW = tH-fH = 10
                 int mapW = 10;