Click Here To Watch Full Tutorial
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
MS Excel Tutorial Part-005
Cell Border | Border in Font Group | Line Style | Line Color | Draw Border | In Hindi
In this, we will learn the border options of Font Group in the Home tab of MS Excel.
We will learn below given topics.
Borders of the Cell
Remove the border of the Cells
Set All side borders of the Cell
Set Thick Outside Border of Cell
Draw Border
Draw Border Grid
Difference between Draw Border and Draw Border Grid
Erase Border
Set or Change Border color i.e. Line Color
Set or Change Border Style i.e. Line Style
Draw Cross border in Cell
These all are very basic and very important topics in MS Excel.
This option is very helpful while we formating content.
This is the only video tutorial where you will find 100% practical examples.
In this Hindi video tutorial, we create videos in such a way that anyone can easily understand the topic.
Then also if you have any queries, please comment with us, and we will reply to you.
MsExcelPart005, #HomeTab, #FontGroup, #CellBorder, #BorderStyle, #LineColor, #DrawBorder, #DrawCrossBorder, #MrCoding, #MrCoding33, #BestMsExcelTutorial, #MsExcelTutorialInHindi
0 notes
Transformações de Intensidade e Filtragem Espacial
1. Realizar a limiarização de uma imagem usando Python e scikit-image.
Uma limiarização de imagem é a transformação de uma imagem para binário, o que significa que ela ficará em preto e branco. Neste método, é “pesado” o histograma da imagem e a partir deste peso é removido o peso do lado mais pesado, até que os dois lados se equilibrem. Abaixo um exemplo de código:
import matplotlib.pyplot as plt from skimage import data from skimage.filters import threshold_otsu image = data.camera() thresh = threshold_otsu(image) binary = image > thresh fig, axes = plt.subplots(ncols=3, figsize=(8, 2.5)) ax = axes.ravel() ax[0] = plt.subplot(1, 3, 1) ax[1] = plt.subplot(1, 3, 2) ax[2] = plt.subplot(1, 3, 3, sharex=ax[0], sharey=ax[0]) ax[0].imshow(image, cmap=plt.cm.gray) ax[0].set_title('Original') ax[0].axis('off') ax[1].hist(image.ravel(), bins=256) ax[1].set_title('Histogram') ax[1].axvline(thresh, color='r') ax[2].imshow(binary, cmap=plt.cm.gray) ax[2].set_title('Thresholded') ax[2].axis('off') plt.show()
Exemplo de imagens:
Bibliografia:
https://pt.wikipedia.org/wiki/Limiarização_por_equilíbrio_do_histograma
https://scikit-image.org/docs/stable/auto_examples/developers/plot_threshold_li.html#sphx-glr-auto-examples-developers-plot-threshold-li-py
2. Plotar o histograma de uma imagem tons de cinza usando Python, scikit-image e matplotlib.
O histograma de uma imagem em tons de cinza apresenta um gráfico resultante descritivo dos tons e frequência dos mesmos na imagem.
import numpy as np import matplotlib.pyplot as plt from skimage.util import img_as_ubyte from skimage import data from skimage.exposure import histogram noisy_image = img_as_ubyte(data.camera()) hist, hist_centers = histogram(noisy_image) fig, ax = plt.subplots(ncols=2, figsize=(10, 5)) ax[0].imshow(noisy_image, cmap=plt.cm.gray) ax[0].axis('off') ax[1].plot(hist_centers, hist, lw=2) ax[1].set_title('Gray-level histogram') plt.tight_layout()
Exemplo de imagem:
Bibliografia:
https://scikit-image.org/docs/stable/auto_examples/applications/plot_rank_filters.html#sphx-glr-auto-examples-applications-plot-rank-filters-py
3. Plotar o histograma de uma imagem colorida (um histograma por canal de cor) usando Python, scikit-image e matplotlib.
""" * Python program to create a color histogram. * * Usage: python ColorHistogram.py <filename>"""import sysimport numpy as npimport skimage.colorimport skimage.iofrom matplotlib import pyplot as plt
# read original image, in full color, based on command# line argumentimage = skimage.io.imread(fname='kodim23.png')
# display the imageskimage.io.imshow(image)# tuple to select colors of each channel linecolors = ("red", "green", "blue")channel_ids = (0, 1, 2)
# create the histogram plot, with three lines, one for# each colorplt.xlim([0, 256])for channel_id, c in zip(channel_ids, colors): histogram, bin_edges = np.histogram( image[:, :, channel_id], bins=256, range=(0, 256) ) plt.plot(bin_edges[0:-1], histogram, color=c)
plt.xlabel("Color value")plt.ylabel("Pixels")
plt.show()
Bibliografia: https://datacarpentry.org/image-processing/05-creating-histograms/
4. Equalizar o histograma de uma imagem usando Python e scikit-image.
import matplotlib import matplotlib.pyplot as plt import numpy as np from skimage import data, img_as_float from skimage import exposure matplotlib.rcParams['font.size'] = 8 def plot_img_and_hist(image, axes, bins=256): """Plot an image along with its histogram and cumulative histogram. """ image = img_as_float(image) ax_img, ax_hist = axes ax_cdf = ax_hist.twinx() # Display image ax_img.imshow(image, cmap=plt.cm.gray) ax_img.set_axis_off() # Display histogram ax_hist.hist(image.ravel(), bins=bins, histtype='step', color='black') ax_hist.ticklabel_format(axis='y', style='scientific', scilimits=(0, 0)) ax_hist.set_xlabel('Pixel intensity') ax_hist.set_xlim(0, 1) ax_hist.set_yticks([]) # Display cumulative distribution img_cdf, bins = exposure.cumulative_distribution(image, bins) ax_cdf.plot(bins, img_cdf, 'r') ax_cdf.set_yticks([]) return ax_img, ax_hist, ax_cdf # Load an example image img = data.moon() # Contrast stretching p2, p98 = np.percentile(img, (2, 98)) img_rescale = exposure.rescale_intensity(img, in_range=(p2, p98)) # Equalization img_eq = exposure.equalize_hist(img) # Adaptive Equalization img_adapteq = exposure.equalize_adapthist(img, clip_limit=0.03) # Display results fig = plt.figure(figsize=(8, 5)) axes = np.zeros((2, 4), dtype=np.object) axes[0, 0] = fig.add_subplot(2, 4, 1) for i in range(1, 4): axes[0, i] = fig.add_subplot(2, 4, 1+i, sharex=axes[0,0], sharey=axes[0,0]) for i in range(0, 4): axes[1, i] = fig.add_subplot(2, 4, 5+i) ax_img, ax_hist, ax_cdf = plot_img_and_hist(img, axes[:, 0]) ax_img.set_title('Low contrast image') y_min, y_max = ax_hist.get_ylim() ax_hist.set_ylabel('Number of pixels') ax_hist.set_yticks(np.linspace(0, y_max, 5)) ax_img, ax_hist, ax_cdf = plot_img_and_hist(img_rescale, axes[:, 1]) ax_img.set_title('Contrast stretching') ax_img, ax_hist, ax_cdf = plot_img_and_hist(img_eq, axes[:, 2]) ax_img.set_title('Histogram equalization') ax_img, ax_hist, ax_cdf = plot_img_and_hist(img_adapteq, axes[:, 3]) ax_img.set_title('Adaptive equalization') ax_cdf.set_ylabel('Fraction of total intensity') ax_cdf.set_yticks(np.linspace(0, 1, 5)) # prevent overlap of y-axis labels fig.tight_layout() plt.show()
Bibliografia:
https://scikit-image.org/docs/stable/auto_examples/color_exposure/plot_equalize.html?highlight=histogram
5. Detectar (concluir) que uma foto está subexposta ou que está superexposta, analisando o histograma.
Uma foto subexposta é quando o histograma apresenta a maior concentração de informações à esquerda do gráfico de exposição:
Uma foto superexposta é quando o histograma apresenta maior concentração no lado direito de seu histograma:
Bibliografia: https://criadoreslab.com.br/histograma-na-fotografia/
https://lightroombrasil.com.br/porque-fotografar-subexposto-e-melhor-que-superexposto/
6. Detectar (concluir) se uma imagem está com baixo contraste ou alto contraste, analisando o histograma.
É possível saber se uma imagem está com alto ou baixo contraste de acordo com a largura de seu histograma, por exemplo:
Um histograma como abaixo significa uma foto com baixo contraste, pois tem muitos pixels com basicamente as mesmas cores:
Já um histograma com alto contraste tem menos pixels, porém com muito mais cores distribuídas, assim seu gráfico fica mais largo:
Bibliografia:
https://www.cambridgeincolour.com/pt-br/tutoriais/histograms1.htm
0 notes
Executing i3lock after suspend
Normally in i3wm tiling manager it doesn’t automatically lock the screen after suspend mode. For automating this process we can add the below line to our i3 config file:-
exec --no-startup-id xss-lock --transfer-sleep-lock -- lock --nofork
The word after --transfer-sleep-lock -- is name of the command which you want to run before system suspend (i.e. the word “lock”). I am using arch Linux. So, I have installed a package named as ‘i3lock-color’ from aur. I have also written one script for i3lock-color and stored it as executable.
i3lock-color script:-
#!/bin/sh
B='#00000000' # blank
C='#ffffff22' # clear ish
D='#ffffffcc' # default
T='#ee00eeee' # text
W='#880000bb' # wrong
V='#bb00bbbb' # verifying
i3lock \
--insidevercolor=$C \
--ringvercolor=$V \
\
--insidewrongcolor=$C \
--ringwrongcolor=$W \
\
--radius=150 \
--insidecolor=$B \
--ringcolor=$D \
--linecolor=$B \
--separatorcolor=$D \
\
--verifcolor=$T \
--wrongcolor=$T \
--timecolor=$T \
--datecolor=$T \
--layoutcolor=$T \
--keyhlcolor=$W \
--bshlcolor=$W \
\
--ignore-empty-password \
--blur 8 \
--clock \
--indicator \
--timestr="%l:%M:%S %p" \
--datestr="%A, %m %Y" \
--screen 1 \
You can get more information by checking the man page of i3lock. After installing i3lock-color package.
0 notes