-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
41 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,17 @@ | ||
import cv2 # by importing this we got access to imread() and imshow() functions | ||
import numpy as np | ||
|
||
# Edge detection algorithm using Canny | ||
# Finding Lane lines (Gryascale convertion) | ||
# Edge Detection:-- is identifying sharp changes in the intensity in adjacent pixels | ||
# Gradient:-- is a measure of change in brightness over adjacent pixels | ||
|
||
|
||
image = cv2.imread('test_image.jpg') # read the image | ||
lane_image=np.copy(image) # copying our array in to a new value not to make change to the first variable latter | ||
|
||
cv2.imshow('result',image)# the first argument is the name of the window that we open and the second is the name of the image that we want to show | ||
gray=cv2.cvtColor(lane_image,cv2.COLOR_BGR2GRAY) # converting to Gray | ||
cv2.imshow('Gray Image',gray)# the first argument is the name of the window that we open and the second is the name of the image that we want to show | ||
|
||
cv2.waitKey() | ||
#cv2.imshow('result',image)# the first argument is the name of the window that we open and the second is the name of the image that we want to show | ||
cv2.waitKey() |