1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

Merge branch 4.x

This commit is contained in:
Alexander Smorkalov
2024-08-27 18:31:36 +03:00
108 changed files with 1241 additions and 646 deletions
@@ -216,8 +216,6 @@ for i in range(len(objpoints)):
print( "total error: {}".format(mean_error/len(objpoints)) )
@endcode
Additional Resources
--------------------
Exercises
---------
@@ -158,9 +158,6 @@ side. That meeting point is the epipole.
For better results, images with good resolution and many non-planar points should be used.
Additional Resources
--------------------
Exercises
---------
@@ -119,9 +119,3 @@ And look at the result below:
If you are interested in graphics, augmented reality etc, you can use OpenGL to render more
complicated figures.
Additional Resources
--------------------
Exercises
---------
@@ -51,23 +51,6 @@ You can modify the pixel values the same way.
Numpy is an optimized library for fast array calculations. So simply accessing each and every pixel
value and modifying it will be very slow and it is discouraged.
@note The above method is normally used for selecting a region of an array, say the first 5 rows
and last 3 columns. For individual pixel access, the Numpy array methods, array.item() and
array.itemset() are considered better. They always return a scalar, however, so if you want to access
all the B,G,R values, you will need to call array.item() separately for each value.
Better pixel accessing and editing method :
@code{.py}
# accessing RED value
>>> img.item(10,10,2)
59
# modifying RED value
>>> img.itemset((10,10,2),100)
>>> img.item(10,10,2)
100
@endcode
Accessing Image Properties
--------------------------
@@ -195,9 +178,3 @@ See the result below. (Image is displayed with matplotlib. So RED and BLUE chann
interchanged):
![image](images/border.jpg)
Additional Resources
--------------------
Exercises
---------
@@ -110,9 +110,6 @@ img2_fg.
![image](images/overlay.jpg)
Additional Resources
--------------------
Exercises
---------
@@ -163,6 +163,3 @@ Additional Resources
2. Scipy Lecture Notes - [Advanced
Numpy](http://scipy-lectures.github.io/advanced/advanced_numpy/index.html#advanced-numpy)
3. [Timing and Profiling in IPython](http://pynash.org/2013/03/06/timing-and-profiling/)
Exercises
---------
@@ -138,6 +138,3 @@ Additional Resources
2. Edward Rosten, Reid Porter, and Tom Drummond, "Faster and better: a machine learning approach to
corner detection" in IEEE Trans. Pattern Analysis and Machine Intelligence, 2010, vol 32, pp.
105-119.
Exercises
---------
@@ -102,9 +102,3 @@ plt.imshow(img3, 'gray'),plt.show()
See the result below. Object is marked in white color in cluttered image:
![image](images/homography_findobj.jpg)
Additional Resources
--------------------
Exercises
---------
@@ -81,9 +81,3 @@ or do whatever you want.
So in this module, we are looking to different algorithms in OpenCV to find features, describe them,
match them etc.
Additional Resources
--------------------
Exercises
---------
@@ -209,9 +209,3 @@ plt.imshow(img3,),plt.show()
See the result below:
![image](images/matcher_flann.jpg)
Additional Resources
--------------------
Exercises
---------
@@ -93,6 +93,3 @@ Additional Resources
-# Ethan Rublee, Vincent Rabaud, Kurt Konolige, Gary R. Bradski: ORB: An efficient alternative to
SIFT or SURF. ICCV 2011: 2564-2571.
Exercises
---------
@@ -67,9 +67,3 @@ See the result below:
![image](images/shitomasi_block1.jpg)
This function is more appropriate for tracking. We will see that when its time comes.
Additional Resources
--------------------
Exercises
---------
@@ -160,9 +160,3 @@ Here kp will be a list of keypoints and des is a numpy array of shape
So we got keypoints, descriptors etc. Now we want to see how to match keypoints in different images.
That we will learn in coming chapters.
Additional Resources
--------------------
Exercises
---------
@@ -155,9 +155,3 @@ Finally we check the descriptor size and change it to 128 if it is only 64-dim.
(47, 128)
@endcode
Remaining part is matching which we will do in another chapter.
Additional Resources
--------------------
Exercises
---------
@@ -101,8 +101,6 @@ while(1):
cv.destroyAllWindows()
@endcode
Additional Resources
--------------------
Exercises
---------
@@ -152,9 +152,3 @@ cap.release()
out.release()
cv.destroyAllWindows()
@endcode
Additional Resources
--------------------
Exercises
---------
@@ -103,9 +103,6 @@ Now you take [H-10, 100,100] and [H+10, 255, 255] as the lower bound and upper b
from this method, you can use any image editing tools like GIMP or any online converters to find
these values, but don't forget to adjust the HSV ranges.
Additional Resources
--------------------
Exercises
---------
@@ -199,9 +199,3 @@ righty = int(((cols-x)*vy/vx)+y)
cv.line(img,(cols-1,righty),(0,lefty),(0,255,0),2)
@endcode
![image](images/fitline.jpg)
Additional Resources
--------------------
Exercises
---------
@@ -114,9 +114,6 @@ For eg, if I apply it to an Indian map, I get the following result :
![image](images/extremepoints.jpg)
Additional Resources
--------------------
Exercises
---------
@@ -88,9 +88,3 @@ the contour array (drawn in blue color). First image shows points I got with cv.
much memory it saves!!!
![image](images/none.jpg)
Additional Resources
--------------------
Exercises
---------
@@ -212,9 +212,3 @@ array([[[ 7, -1, 1, -1],
[ 8, 0, -1, -1],
[-1, 7, -1, -1]]])
@endcode
Additional Resources
--------------------
Exercises
---------
@@ -124,9 +124,6 @@ See, even image rotation doesn't affect much on this comparison.
moments invariant to translation, rotation and scale. Seventh one is skew-invariant. Those values
can be found using **cv.HuMoments()** function.
Additional Resources
====================
Exercises
---------
@@ -150,6 +150,3 @@ Additional Resources
--------------------
-# Details about the [bilateral filtering](http://people.csail.mit.edu/sparis/bf_course/)
Exercises
---------
@@ -163,6 +163,3 @@ Additional Resources
--------------------
-# "Computer Vision: Algorithms and Applications", Richard Szeliski
Exercises
---------
@@ -146,9 +146,6 @@ mark the rectangle area in mask image with 2-pixel or 3-pixel (probable backgrou
mark our sure_foreground with 1-pixel as we did in second example. Then directly apply the grabCut
function with mask mode.
Additional Resources
--------------------
Exercises
---------
@@ -103,9 +103,3 @@ plt.show()
Check the result below:
![image](images/double_edge.jpg)
Additional Resources
--------------------
Exercises
---------
@@ -125,9 +125,3 @@ output of that code for the same image as above:
You can clearly see in the histogram what colors are present, blue is there, yellow is there, and
some white due to chessboard is there. Nice !!!
Additional Resources
--------------------
Exercises
---------
@@ -123,6 +123,3 @@ Additional Resources
-# "Indexing via color histograms", Swain, Michael J. , Third international conference on computer
vision,1990.
Exercises
---------
@@ -197,6 +197,3 @@ Additional Resources
--------------------
-# [Cambridge in Color website](http://www.cambridgeincolour.com/tutorials/histograms1.htm)
Exercises
---------
@@ -151,6 +151,3 @@ Also check these SOF questions regarding contrast adjustment:
C?](http://stackoverflow.com/questions/10549245/how-can-i-adjust-contrast-in-opencv-in-c)
4. [How do I equalize contrast & brightness of images using
opencv?](http://stackoverflow.com/questions/10561222/how-do-i-equalize-contrast-brightness-of-images-using-opencv)
Exercises
---------
@@ -45,9 +45,3 @@ cv.destroyAllWindows()
Result is shown below:
![image](images/houghcircles2.jpg)
Additional Resources
--------------------
Exercises
---------
@@ -103,6 +103,3 @@ Additional Resources
--------------------
-# [Hough Transform on Wikipedia](http://en.wikipedia.org/wiki/Hough_transform)
Exercises
---------
@@ -152,6 +152,3 @@ Additional Resources
--------------------
-# [Morphological Operations](http://homepages.inf.ed.ac.uk/rbf/HIPR2/morops.htm) at HIPR2
Exercises
---------
@@ -139,6 +139,3 @@ Additional Resources
--------------------
-# [Image Blending](http://pages.cs.wisc.edu/~csverma/CS766_09/ImageMosaic/imagemosaic.html)
Exercises
---------
@@ -132,9 +132,3 @@ cv.imwrite('res.png',img_rgb)
Result:
![image](images/res_mario.jpg)
Additional Resources
--------------------
Exercises
---------
@@ -291,6 +291,3 @@ Additional Resources
Theory](http://cns-alumni.bu.edu/~slehar/fourier/fourier.html) by Steven Lehar
2. [Fourier Transform](http://homepages.inf.ed.ac.uk/rbf/HIPR2/fourier.htm) at HIPR
3. [What does frequency domain denote in case of images?](http://dsp.stackexchange.com/q/1637/818)
Exercises
---------
@@ -186,9 +186,3 @@ cv.destroyAllWindows()
See the result below for K=8:
![image](images/oc_color_quantization.jpg)
Additional Resources
--------------------
Exercises
---------
@@ -80,6 +80,3 @@ Additional Resources
-# [Machine Learning Course](https://www.coursera.org/course/ml), Video lectures by Prof. Andrew Ng
(Some of the images are taken from this)
Exercises
---------
@@ -147,6 +147,3 @@ Additional Resources
recommended to visit. Our test image is generated from this link)
2. [Online course at coursera](https://www.coursera.org/course/images) (First image taken from
here)
Exercises
---------
@@ -240,9 +240,6 @@ make doxygen
@endcode
Then open opencv/build/doc/doxygen/html/index.html and bookmark it in the browser.
Additional Resources
--------------------
Exercises
---------
@@ -119,9 +119,6 @@ Building OpenCV from source
@note We have installed with no other support like TBB, Eigen, Qt, Documentation etc. It would be
difficult to explain it here. A more detailed video will be added soon or you can just hack around.
Additional Resources
--------------------
Exercises
---------