This Shot: Macro on Coffee Foam, using Nikon S9900.
…Click Image to Enlarge… Camera in Hand, F:4.2 , ISO:320 , Shutter: 1/30s |
By: Ali Radwani
]]> There is a lot of sketching challeng in the twitter asking the readers to draw/sketch something inspired by it.
I fond the @AnimalAlphabets there challenge this week is SLOTH.
So here is my sketch using pencil then black Pen, and some watercolor, it takes around 45min. More Sketches on my Sketch page ..
you may Follow me on Twitter @h_ta3kees
Here is my sketch..
This Shot: I place my Milk Mug in the sun-light coming from a window, the camera on graound level and i took the shot using BW-color from the camera.
…Click Image to Enlarge… Camera in Hand, F:4 , ISO:160 , Shutter: 1/30s |
::.. To see all my Nikon S9900 Photos Click-Here
::.. To see all my Nikon D7100 Photos Click-Here
::.. To see all my Nikon D90 Photos Click-Here
By: Ali Radwani
This Shot: A Macto-Shot on Fruit, using Nikon S9900.
Camera in Hand, F:4.2, ISO:125, Shutter:1/4s
Camera in Hand, F:4.2, ISO:125, Shutter:1/4s |
By: Ali Radwani
]]>[NOTE: To keep the code as simple as we can, We WILL NOT ADD any user input Varevecations. Assuming that our user will Enter the right inputs.]
Our last post about Random Pixel Color, we generate a Numpy Array of Row, Coloum and color then we Plot it on the screen [Read the Post Here], now in this post we will use some Math consepts to try if we can get some patterns out of ramdom Function.
Our Tools: In this post we will use the following:
1. Jupyter-NoteBook.
2. numpy.
3. random.
4. matplotlib.
5. PIL or Pillow.
In this version we will use “Fibonacci Sequence” Fibonacci Sequence is the sum of the two preceding ones, starting from 0 and 1 such as [1, 1, 2, 3, 5, 8, 13 … n], in our code we will have three variables:
cw: canvas width,
ch: canvas hight,
offset: the offset will be the value that will reset the Fibonacci Sequence to 1.
So, if we run the application, we will generate three numbers that will present the colors R,G,B (Will be Generated ONE time) then for each pixcel in (cw*ch) we will calculate a v as Fibonacci Sequence from fs1 =1, fs2 = 1 here is the code:
v = fs1 + fs2
fs1,fs2 = fs2, v
this value v will be added to the colors r,g,b (on each pixcel) untill the v is grater the the offset numbre that we pass to the Function. If v > offset then we will re-set the fs1 = 1, fs2 = 1,.. Here is the Code ..
Run No.1 | Run No.2 |
Run No.3 |
Run No.4 |
The above is just 25×25 and i change the offset, feel free to download the code and change the numbers .. see what you will get …
..:: Have Fun with Coding ::..
To Download my Python code (.py) files Click-Here
By: Ali Radwani
Effective pixels: 16.0 million
Image sensor: 1/2.3-in. type CMOSLens: NIKKOR lens with 30x optical zoom
Focal length: 4.5-135 mm
(angle of view equivalent to that of 25-750 mm lens in 35mm [135] format)Maximum aperture: f/3.7-6.4
Digital zoom: Up to 4x
(angle of view equivalent to that of approx. 3000 mm lens in 35mm [135] format)Vibration reduction
Autofocus (AF)
Macro mode: Approx. 1 cm (0.4 in.)Monitor 7.5 cm (3-in.) wide viewing angle TFT LCD with anti-reflection.
Storage: SD , SDHC , SDXC
Internal memory (approx. 473 MB)ISO 125-1600
ISO 3200, 6400 (available when using P, S, A, or M mode)More Specifications [Click Here]
I use the camera for a while, not sure why I stop, so i decided to start playing with it more, and post some output. So in coming weeks i will post some landscape and macro shots.
By: Ali Radwani
]]>This week sketch challenge @1hour1sketch on Twitter is to Draw maybe a small Wood Store House so here is my sketch using pencil then black Pen, it takes around 15min. More Sketches on my Sketch page ..
you may Follow me on Twitter @h_ta3kees
Here is my sketch..
[NOTE: To keep the code as simple as we can, We WILL NOT ADD any user input Varevecations. Assuming that our user will Enter the right inputs.]
Last week I start reading and studying about “Image Processing”, in some point I was reading about converting an image to Array of numbers, and re-converting that Array back to an Image, at that moment popped into my mind what if we just generate an Array with random numbers and then show it as an Image.
In this article we will write a first simple Function to generate a random numbers presenting the three main color Red, Blue and Green; then storing the numbers in an Array then using matplotlib library to display the Image.
Our Tools: In this post we will use the following:
1. Jupyter-NoteBook.
2. numpy.
3. random.
4. matplotlib.
5. PIL or Pillow.
Coding I am user Jupyter NoteBook on samsung Tab S4. First we will do all imports we need as:
from PIL import Image
import numpy as np, matplotlib.pyplot as plt
import random
%matplotlib inline
Now, we will write a Function called rand_color, we will run a nested for loop to generate the Row and Column (width and height) and in/for each row we will generate thee numbers of colors range(0,255) as one pixel and storing them in an array, then we display the Array using:
Image.fromarray and plt.imshow(). Here is the Code ..
Run No.1 |
Run No.2 |
Run No.3 |
Run No.4 |
The above is just 25×25 image with random color pixels, this is the first function using default random, in coming posts we will use some Math variables [such: log,sin], constants [such: pi, golden ratio] to see if we can get a pattern from random.
..:: Have Fun with Coding ::..
To Download my Python code (.py) files Click-Here
By: Ali Radwani
[NOTE: To keep the code as simple as we can, We WILL NOT ADD any user input Varevecations. Assuming that our user will Enter the right inputs.]
In Last Parts (2, 3 and 4) we wort the Following Functions:
In this last part-5 we will write the last main Function to aplay the Heap Sorting Algorithm.
Scope of Work: Deleting a Node from a Max-Heap Array is the main function in sorting an Array using Max-Heap Algorithm, the Deleting is always from the Root Node, So if we delete the most top Node [Root] (and store it in index[0] in a temp_array) then we move the Last Node to it’s position and by doing that we miss the Max-Heap state of the Array, so we convert the array to a Max-heap, then we Delete the Root again until we delete all the elements in the Array.. Here the Algorithm:
Assuming we have a Max-Heap Array:
1. Delete the Root Element, and Store it in index[0] in Temp_array.
2. Move the Last Element in the Array to index[0].
3. If the Array not in Max-Heap then Convert it to a Max-Heap.
4. Repeat Steps 1 to 3 Until length of Array is 0.
In our list of Functions up, we have the three Functions we Need to complete/apply a Max-Heap Sorting:
We Delete a Node using def delete_node(arr,inside):
then in a while loop we call both
def check_if_max_heap (arr,inside): and
def convert_to_max_heap (arr,inside): so let’s see the code..
We finish Max-Heap Sorting Algorithm, ..
..:: Have Fun with Coding ::..
To Download my Python code (.py) files Click-Here
By: Ali Radwani
]]>[NOTE: To keep the code as simple as we can, We WILL NOT ADD any user input Varevecations. Assuming that our user will Enter the right inputs.]
In Last Parts (2 & 3) we wort the Following Functions:
In this Part-4 we will cover another Two important Functions that we need to talk about in our mission to understand the Heap Sorting Algorithm. In a Max-Heap Array we may need to Add new Node to the Array and we may need to Delete a Node. Also I just add Item No.7 style=”color:#2662ee;”>print(‘ ‘*5,’ 7. Start Heap Sorting.’) to the main-menu so we can do Heap Sorting to a given Array.
Starting with Add New Node, Simply we Add the Node to the end of the Array using arrat.append(new_node) then we need to Check If still the Array in Max-Heap If NOT, We MUST Convert it to a Max-Heap.
Scope of Work Ask the user to Enter the New Node Value, Add The Node to the End of the Array, in While Loop Call convert_to_max_heap (arr,True), check_if_max_heap (arr,True) as following:
while not is_max:
arr = convert_to_max_heap (arr,True)
is_max = check_if_max_heap (arr,True)
this will keep check and convert the Array to Max-Heap. Here is the Full code and run screen ..
Now we will write a Function to Delete a Node from the Max-Heap Array. Deleting a Node is just by removing the first node in the Array (Array[0]), then moving the last element in the Array to it’s position, by doing this we may not having a Max-Heap Array any-more, so we need to convert the array to a Max-Heap. In our application here, we will have a while loop and calling the functions (check_if_max_heap and convert_to_max_heap) until we have the Array in a Max-Heap. Here is the code ..
We will stop here in this part. In Part-5 we will Sort any Array using the Max-Heap Sort Algorithm.
..:: Have Fun with Coding ::..
To Download my Python code (.py) files Click-Here
By: Ali Radwani
]]>