DISPLAY DATA IN HISTOGRAM FORM USING THE ARDUINO PLATFORM

ОТОБРАЖЕНИЕ ДАННЫХ В ВИДЕ ГИСТОГРАММЫ С ИСПОЛЬЗОВАНИЕМ ПЛАТФОРМЫ ARDUINO
Цитировать:
Makhmudov M.M., Alimova Z.A., Kimizbayeva A.E. DISPLAY DATA IN HISTOGRAM FORM USING THE ARDUINO PLATFORM // Universum: технические науки : электрон. научн. журн. 2021. 12(93). URL: https://7universum.com/ru/tech/archive/item/12861 (дата обращения: 22.12.2024).
Прочитать статью:

 

ABSTRACT

In this article, the histograms, created on the Arduino platform, are presented in this shooting scene, as well as the exposure meter. He only offers an exhibition pair, which is in line with the understanding of the painting. And this is the most obvious example of light and light scattering in photography. To understand what the histogram is talking about, you need to understand that it is a graph.

АННОТАЦИЯ

В данной статье приведены гистограммы, созданные на платформе Arduino, которые дают представление о снимаемой сцене, как и экспонометр. Экспонометр предлагает только выставочную пару, что соответствует пониманию картины. Показано, что это наиболее очевидный пример света и светорассеяния на фотографии, чтобы понять, о чем говорит гистограмма, нужно понять, что указано на графике.

 

Keywords Arduino platform, histogram, exposure meter, tonal range, composition, contrast,p ixels, gradation, camera.

Ключевые слова: платформа Arduino, гистограмма, экспонометр, тональный диапазон, композиция, контраст, пиксели, градация, камера.

 

A histogram is a graph that shows the current tonal range of an image, allowing it to be evaluated and corrected if necessary. The tonal range refers to the levels of brightness. The histogram describes which part of the image is darker and which part is whiter, as well as all the cases between these colors.

Histograms are also widely used when working with color images. Although we don’t think of color as anything other than color, each of them has a level of brightness in the image. For example, yellows are usually very light in color, while blues are much darker. This difference in brightness has a big impact on the tonal range of the whole image. For example, we consider a photo to be somehow “incomplete”. The subject of the picture is interesting, the composition is good, but in general it can not hold its own. This is because there is no contrast in the picture. The lights are a bit dim and the shadows aren’t dark enough.

Now it may seem possible to spot such flaws with the naked eye, but you can’t always rely on your own point of view. You will need to compare two side-by-side images. Easy, but looking at the same image can easily fool the user.

Also keep in mind that the monitor is not always able to display the colors as they are. If the user has set the screen brightness to full, then the picture will look great, but the user may not get the expected result when he prints it. A histogram helps to avoid this situation because it takes information directly from the image, always displays information in a clear tonal range, and helps identify contrast problems.

Now imagine a graph where the light along the horizontal axis is completely black - “0” - on the far left, to full white - “255” - on the right. (0 and 256 correspond to full black and full white on the 256 shade scale adopted). Therefore, no data is written around “0” other than darkness (no data). The brightness gradually increases to the right, until it reaches 255 - full white, where no details are obtained. The distribution of brightness pixels in the histogram is horizontal, from black (left) to white (right) axis. Light Distribution Histogram Arrows But only information about the distribution of brightness gives us some information. It is very important for the photographer to understand what the overall tone of the message is, that is, how many pixels are associated with a particular brightness shade. For example, an image of a winter snowy landscape will be mostly white, while the proportion of images with dark values ​​will be very small. The pixels corresponding to the gradation of the horizontal axis, the vertical axis, are used to transmit information about the amount of data. The area occupied by a certain brightness of the image is “drawn” along the vertical axis of the histogram. The histogram tells us about two sides of the image: the brightness and the image area where the information is recorded with that brightness. Look at the histogram of the photo taken - does it fit your idea? Is the picture open correctly? In addition, the histogram provides information on data loss. In both film cameras, reflects the light intensity even in a digital matrix. The capabilities of both films and matrices are limited: they are only able to receive light in a certain intensity range. If there is not enough light to fix it, the result will be black. If there is too much light, everything will turn white. These two boundary ranges are called Dynamic Ranges. When you capture a scene where the light intensity exceeds the dynamic range, you cut off one or both sides. This can be easily seen in the histogram of the captured image. the result will be black. If there is too much light, everything will turn white. These two boundary ranges are called Dynamic Ranges. When you capture a scene where the light intensity exceeds the dynamic range, you cut off one or both sides. This can be easily seen in the histogram of the captured image. the result will be black. If there is too much light, everything will turn white. These two boundary ranges are called Dynamic Ranges. When you capture a scene where the light intensity exceeds the dynamic range, you cut off one or both sides. This can be easily seen in the histogram of the captured image.

Therefore, in the histogram, first of all, it is necessary to pay attention to the right and left edges of the diagram. A graph with a lot of data adjacent to the right or left side of the histogram shows the loss of details (data) in the shadow or focus, respectively. Take a look at the photo taken at the cafe and its histogram. As can be seen, the left edge of the histogram is cut - the data is lost in the shadows. The histogram is cut in the shadows The photo is completely blacked out, the data in it is lost, and the fact that it is not processed in graphics editors allows you to "pull" it. Data loss in the shadows A photograph of a steam locomotive can be an example of the opposite situation: the histogram is shortened to the right and the data in the focus is lost.

In the previous diagram, you can create a glowing histogram by adding an IR distance sensor. Several LEDs of different colors can then be used for clarity. A schematic diagram of a device with multi-colored LEDs and an IR distance sensor is shown in Figure 1.

 

Figure 1 is a device diagram that implements the “Remote histogram” effect

 

Knowing the principle of operation of the analog sensor and the shift register, you can independently select the distance limits, the corresponding combinations of on and off LEDs (Fig. 2).

All decimal combinations of the histogram are stored in an array of nine elements. We limit the maximum distance and increase the values ​​from 0 to 8. The list below demonstrates the histogram effect software.

// Remote histogram

const int SER = 8;                      // Pin to connect the DATA pin

const int LATCH = 9;                 // Pin to connect the LATCH pin

164 Part II. Environmental management

const int CLK = 10;                    // Pin to connect the CLOCK pin

const int DIST = 0;                     // Connection to connect the distance sensor

// Possible values ​​of LED

int vals [9] = {0,1,3,7,15,31,63,127,255};

// Maximum distance value int maxVal = 500;

// Minimum distance value

int minVal = 0;

}}

void setup ()

{

// Set the pins to exit (OUTPUT)

pinMode (SER, OUTPUT);

pinMode (LATCH, OUTPUT);

pinMode (CLK, OUTPUT);

void loop ()

{

int distance = analogRead (DIST);

distance = map (distance, minVal, maxVal, 0, 8);

distance = limitation (distance, 0.8);

digitalWrite (LATCH, LOW);              // LATCH - low - start sending

shiftOut (SER, CLK, MSBFIRST, waltz [distance]); // The most important bit is the first

digitalWrite (LATCH, HIGH);             // LATCH - high

delay (10);

}}

Download the app to your Arduino board, launch it, and move your hand back and forth in front of the distance sensor. You should see that the histogram responds to hand movements. If the device does not work properly, adjust the maxVal and minVal values ​​to better adjust the distance sensor reading.

 

Figure 2 The combination of on and off LEDs and the corresponding decimal values

 

To track the values ​​obtained at different distances, you can start the serial connection in the setup () header and call the Serial.printIn (dist) function immediately after the analogRead (DIST) step. Here's how sliding registers work, what's the difference between serial and parallel data transfer, what's the difference between decimal and binary data displays, and how to create light animation with scroll registers seen. The more you work on creating new Arduino-based devices, the more often the question arises: "What happens when the Arduino board legs run out?" For example, in one popular project, an Arduino board controls many flickering LEDs. Light up your room! Light up your computer! decorate your appliances with LEDs!

But the problem persists. What if you want to replace 50 LEDs (or control another digital output) and all the input / output legs are already in use? Shift registers are useful here, which allows you to expand the capabilities of the Arduino board and avoid buying more expensive microcontrollers with additional input-output legs. This chapter discusses the software needed to work with shift registers and expand the digital output of the Arduino board. More detailed shift registers were introduced and help was provided to understand the design of devices with a large number of digital outputs. As in most of its predecessors, the Arduino Uno was used as a platform. Any other Arduino board is suitable for experiments, but the choice should always be reasonable and optimally suited to a particular project. This is the perfect way to implement devices that require a lot of connections. However, engineers should always keep all the nuances in mind when designing. If the performance of the Arduino Uno is sufficient, but the digital outputs are not sufficient, you can simply add a few shift registers. This is cheaper and more compact than choosing a more powerful board. However, the code is more complex and may take longer to extract.

 

References:

  1. Tero Karvinen, Kimmo Karvinen, Ville Valtokari. Delaem sensory. Projects sensornyx ustroystv na baze Arduino i Raspberry Pi. Russia, 2015
  2. Aandre, F. Microcontrollers of SX family Ubicom / F. Aandre. - M .: DMK, 2016. - 272 c.
  3. Тожибоев А.К., Султонов Ш.Д. Измерение, регистрация и обработка результатов основных характеристик гелиотехнических установок // Universum: технические науки : электрон. научн. журн. 2021. 11(92).
  4. Тожибоев А. К., Хакимов М. Ф. Расчет оптических потерь и основные характеристики приемника параболоцилиндрической установки со стационарным концентратором //Экономика и социум. – 2020. – №. 7. – С. 410-418.
  5. Тожибоев А. К., Немадалиева Ф. М. Комбинированные солнечные установки для теплоснабжения технологических процессов промышленных предприятий. результаты разработки и испытаний //Современные технологии в нефтегазовом деле-2018. – 2018. – С. 253-256.
  6. Davlyatovich, S. S. ., & Kakhorovich, A. T. . (2021). Recombination Processes of Multi-Charge Ions of a Laser Plasma. Middle European Scientific Bulletin, 18, 405-409. https://doi.org/10.47494/mesb.2021.18.906
Информация об авторах

Senior Lecturer, Tashkent State Technical University, Uzbekistan, Tashkent

старший преподаватель, Ташкентский государственный технический университет, Узбекистан, г. Ташкент

PhD Associate Professor, Tashkent State Technical University, Uzbekistan, Tashkent

PhD доцент, Ташкентский государственный технический университет, Узбекистан, г. Ташкент

Senior Lecturer, Tashkent State Technical University, Uzbekistan, Tashkent

старший преподаватель, Ташкентский государственный технический университет, Узбекистан, г. Ташкент

Журнал зарегистрирован Федеральной службой по надзору в сфере связи, информационных технологий и массовых коммуникаций (Роскомнадзор), регистрационный номер ЭЛ №ФС77-54434 от 17.06.2013
Учредитель журнала - ООО «МЦНО»
Главный редактор - Ахметов Сайранбек Махсутович.
Top