<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Restoration of images of social networks that have undergone processing, on the example of the social network Instagram</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>М I Khotilin</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>N S Kravtsova</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>A V Kupriyanov</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>R А Paringer</string-name>
          <email>rusparinger@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Image Processing Systems Institute of RAS - Branch of the FSRC "Crystallography and Photonics" RAS</institution>
          ,
          <addr-line>Molodogvardejskaya street 151, Samara, Russia, 443001</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Samara National Research University</institution>
          ,
          <addr-line>Moskovskoe Shosse 34А, Samara, Russia, 443086</addr-line>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2019</year>
      </pub-date>
      <fpage>566</fpage>
      <lpage>569</lpage>
      <abstract>
        <p>This paper is devoted to finding the source images for the processed images of social networks. Existing methods and approaches that take place in the performance of this task are considered. The algorithms of image recovery is investigated and planned for finalization.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>In the modern world it is continuously generated a huge amount of data, whether the data received
from the satellite, or sensors in the aircraft, bank transactions, patient diagnostic data, etc. A special
place is occupied by social networks. The significance of social networks is due to the fact that, on the
one hand they are the subject of socialization of people, and on the other - the most powerful and
affordable political, ideological and economic instrument. A number of papers are dedicated to
researches of social networks as systems, which contain large volumes of dat.</p>
      <p>
        Images have always occupied an important place in the life of people: whether it be cave paintings
in primitive society, paintings by great artists, and especially photographs. With the advent of social
networks, photos began to move from the category of personal to the category of public domain and
became not only a new way of self-presentation, but also gave rise to other ways of thinking and
vision [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. People literally convey their individuality through photos: express their opinions, upload
so-called “selfies”, arrange discussions, share impressions and emotions in comments to photos or by
color processing photos using various editors or filters.Social network “Instagram” began to play a
huge role in the life of modern society. Data and images from it helps in various areas of life, for
example, the police can solve crimes through photo data, psychologists can study various trends in the
lives of modern people.
      </p>
      <p>
        The color characteristic is one of the most significant characteristics describing the image. With it,
you can extract various data that can be useful in many areas of human activity, such as psychology
and sociology. In 2015, the Laboratory for the Study of Big Data, under the leadership of Lev
Manovich, collected and analyzed 2.3 million photographs from the Instagram social network of large
cities such as New York, Tokyo, Bangkok, San Francisco and eleven other global cities. With the help
of the analysis conducted by the laboratory, it was possible to see the “biological rhythms” for which
the metropolis lives, as well as the life of a resident of one city differs from that of another, as the time
frame and much more differ [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
      </p>
      <p>Also, the extracted data can be useful for example in medicine, in object selection and recognition
of objects and in many other areas.</p>
      <p>Image restoration is one of the most important tasks of computer vision and image processing. It
finds its solution, for example, when detecting various kinds of tumors in medicine, when tracking
objects in security systems, when restoring images, and in many others. For image restoration, various
methods are used, both classical and modern, using work with neural networks and big data processing
tools, or BigData.</p>
      <p>In the future it is planned to transfer the implementation to such services as Apache Flume for data
collection and Apache Spark for data processing as well as use Apache Cassandra for data storage.</p>
      <p>This paper describes a method for finding the original image by determining the filter characteristic
with which it was processed.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Getting the source data for image recovery</title>
      <p>During the work, it was decided to use the social network Instagram, for analysis. Users of this social
network often post photos and images that have been previously processed by various filters.</p>
      <p>To obtain the original data, as a first step it was decided to write software that allows access to the
social network through special API and obtain the necessary data from it, namely the image itself and
additional service information containing the description and so-called tags indicating the filters used.
To gain access to the images, it is necessary to authenticate, which requires special access keys.
Authentication occurs through OAuth protocol version 2.0. This protocol is an open authorization
protocol that allows limited access to protected resources to a third party (our software system),
without the need to transfer a username and password to a third party (complex). After passing
authorization and authentication, it becomes possible to access images and their descriptions and
service information, and to download it to the computer as files.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Restoration of original images</title>
      <p>Each image is a set of pixels characterized by its color brightness values and the whole image can be
viewed as a three-layer table, each layer of which is a table consisting of pixels with specific
brightness values of red, green, and blue. Images processed using special filters have a
colorbrightness distribution different from the original image.</p>
      <p>In the course of the work, an educational sample of images was prepared, containing 100 pairs of
images - the original and processed by a certain type of filter, as well as its name. An example of
image data is shown in figure 1.</p>
      <p>Next, using the written analysis software, color analysis of the images was carried out: the
distribution of colors by brightness was calculated and histograms were constructed for each of the
used filters. An example of the initial histogram of color distribution by layers of a single image is
presented in figure 2.
The distribution for the whole class of images processed by a certain filter is similarly constructed.</p>
      <p>Further, since the filter uses the same brightness transformations, then by subtracting the image
processed by the filter from the matrix of the original image from the matrix, the filter matrix can be
obtained. By adding all the results of calculating the matrices of filters for pairs of images processed
by the same filters, and also by normalizing, we obtain a common matrix for a filter of a certain type.</p>
      <p>Hence, since the service information obtained from the social network in the previous step contains
data on the applied filter, it is not difficult to restore the original image using the filter matrix.</p>
      <p>To test this hypothesis, a test sample was organized, containing about 1000 images received from
the Instagram network, and analysis and restoration of the original images was carried out. An
example of the result of the work can be seen in figure 3.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Conclusion</title>
      <p>Definition of source images is one of the most significant tasks of computer vision and image
processing. It finds its solution in various fields of human activity. Often, existing image processing
methods work fine with relatively small amounts of raw data. Processing of large arrays of source
images takes considerable time, which is absolutely unacceptable in a number of tasks.</p>
      <p>Currently, work is underway to adapt the above methods to work with large volumes of data or
BigData, and software is being developed that allows for the proper processing of image arrays and
the recognition of objects on them.</p>
    </sec>
    <sec id="sec-5">
      <title>Acknowledgments</title>
      <p>This work was financially supported by the Russian Foundation for Basic Research under grant #
1929-01135, # 18-37-00418, # 17-01-00972 and by the Ministry of Science and Higher Education within
the State assignment to the FSRC “Crystallography and Photonics” RAS No. 007-GZ/Ch3363/26
(theoretical results).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Manovich</surname>
            <given-names>L Z</given-names>
          </string-name>
          <year>2015</year>
          <article-title>Instagram is a window in the mind and imagination of a person Instagram is a window in the mind and imagination of a person Instagram is a window in the mind and imagination of a person MediaProfi</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Khaykin</surname>
            <given-names>S 2008</given-names>
          </string-name>
          <article-title>Neural networks: full course (Williams Publishing House</article-title>
          ) p
          <fpage>1131</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Sergeev</surname>
            <given-names>V V</given-names>
          </string-name>
          <year>1998</year>
          <article-title>Application of the methodology of pattern recognition in digital image processing tasks</article-title>
          <source>Autometry</source>
          <volume>2</volume>
          <fpage>63</fpage>
          -
          <lpage>76</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Verhagen</surname>
            <given-names>K</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Doyne</surname>
            <given-names>R</given-names>
          </string-name>
          and
          <string-name>
            <surname>Groon F 1985 Pattern Recognition</surname>
          </string-name>
          <article-title>: Status and Prospects (М</article-title>
          .: R&amp;S) p
          <fpage>104</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Samal</surname>
            <given-names>D I</given-names>
          </string-name>
          <year>2002</year>
          <article-title>Algorithms for human identification from a photo portrait based on geometric transformations Thesis for the degree of Candidate of Science</article-title>
          .
          <source>Institute of Technical Sciences. Cybern (NAS of Belarus</source>
          , Мinsk) p
          <fpage>170</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <article-title>[6] Graphic filters based on the torsion matrix URL: https://habrahabr</article-title>
          .ru/post/43895 (
          <issue>01</issue>
          .
          <fpage>05</fpage>
          .
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Kravtsova</surname>
            <given-names>N S</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Paringer</surname>
            <given-names>R A</given-names>
          </string-name>
          and
          <string-name>
            <surname>Kupriyanov A V 2017</surname>
          </string-name>
          <article-title>Parallel implementation of the informative areas generation method in the spatial spectrum domain</article-title>
          <source>Computer Optics</source>
          <volume>41</volume>
          (
          <issue>4</issue>
          )
          <fpage>585</fpage>
          -
          <lpage>587</lpage>
          DOI: 10.18287/
          <fpage>2412</fpage>
          -6179-2017-41-4-
          <fpage>585</fpage>
          -587
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <surname>Khotilin</surname>
            <given-names>M</given-names>
          </string-name>
          ,
          <article-title>Blagov A 2016 Visualisation and cluster analysis of social networks</article-title>
          <source>CEUR Workshop Proceedings</source>
          <volume>1638</volume>
          <fpage>843</fpage>
          -
          <lpage>850</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <surname>Reece</surname>
            <given-names>A</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Danforth</surname>
            <given-names>C 2019</given-names>
          </string-name>
          <article-title>Instagram photos reveal predictive markers of depression EPJ Data Science URL</article-title>
          : https://epjdatascience.springeropen.com/articles/10.1140/epjds/s13688-017-0110- z (
          <volume>07</volume>
          .
          <fpage>05</fpage>
          .
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>Image</given-names>
            <surname>Pre-processing - Towards Data Science</surname>
          </string-name>
          <string-name>
            <surname>URL</surname>
          </string-name>
          : https://towardsdatascience.com/imagepre-processing
          <source>-c1aec0be3edf (17.05</source>
          .
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <surname>Krishnaveni</surname>
            <given-names>C</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Udhayakumar U 2018 Big Data</surname>
          </string-name>
          <article-title>Analytics: Challenges and Applications for Social Media Data International Journal of Engineering</article-title>
          and Techniques - National
          <source>Conference On Emerging Trends in Computing Technologies</source>
          <volume>107</volume>
          <fpage>1</fpage>
          -
          <lpage>6</lpage>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>