in Education by
I have an image with horizontal and vertical lines. In fact, this image is the BBC website converted to horizontal and vertical lines. My problem is that I want to be able to find all the rectangles in the image. I want to write a computer program to find all the rectangles. Does anyone know how to do this or suggest ideas on how to get started? This task is easy for me as a person to find the visual rectangles, but I am not sure how to describe it as a program. Image is the BBC website here http://www.bbc.co.uk/ I wrote the code which converts the BBC website image to the horizontal and vertical line, the problem is these lines do not completely meet at the corners and sometimes they do not completely form a rectangle. Thanks! Select the correct answer from above options

1 Answer

0 votes
by
 
Best answer
Nowadays, there are many libraries to solve your problem. OpenCV (image processing and computer vision library written in c) has implementation for Hough transform (the simple hough transform find lines in an image, while the generalized one finds more complex objects) so that could be a good start. This transformation is also used to find faces in an image and reflect them with a rectangle or square. For the rectangles which do have closed corners, there are also corner detectors such as cornerHarris which can help. I ran the hough lines demo provided with OpenCV and here's the result on the image you gave (detected lines marked in red): In the above image, you can see that wherever the closed rectangular patterns were observed, the algorithm has drawn some specific rectangular shapes there. Hope this answer helps.

Related questions

0 votes
    I am new to TensorFlow. While I am reading the existing documentation, I found the term tensor really confusing. ... types of tensors? Select the correct answer from above options...
asked Jan 29, 2022 in Education by JackTerrance
0 votes
    Suppose I have a Tensorflow tensor. How do I get the dimensions (shape) of the tensor as integer values? I ... 'Dimension' instead. Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    The classifiers in machine learning packages like liblinear and nltk offer a method show_most_informative_features(), which ... lot! Select the correct answer from above options...
asked Feb 4, 2022 in Education by JackTerrance
0 votes
    I am learning programming (Python and algorithms) and was trying to work on a project that I find interesting. ... is impossible). Select the correct answer from above options...
asked Feb 2, 2022 in Education by JackTerrance
0 votes
    I am training on 970 samples and validating on 243 samples. How big should batch size and number of epochs be ... on data input size? Select the correct answer from above options...
asked Feb 1, 2022 in Education by JackTerrance
0 votes
    I don't understand which accuracy in the output to use to compare my 2 Keras models to see which one is better. ... - val_acc: 0.7531 Select the correct answer from above options...
asked Feb 1, 2022 in Education by JackTerrance
0 votes
    How to load a model from an HDF5 file in Keras? What I tried: model = Sequential() model.add(Dense(64, ... list index out of range Select the correct answer from above options...
asked Feb 1, 2022 in Education by JackTerrance
0 votes
    When you run a Keras neural network model you might see something like this in the console: Epoch 1/3 6/1000 [. ... to a file. Thanks! Select the correct answer from above options...
asked Jan 31, 2022 in Education by JackTerrance
0 votes
    I try to learn and implement a simple genetic algorithm library for my project. At this time, evolution, ... Gaussian distribution?.) Select the correct answer from above options...
asked Jan 26, 2022 in Education by JackTerrance
0 votes
    I'm trying to read an image from electrocardiography and detect each one of the main waves in it (P wave, QRS ... some ideas? Thanks! Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    In the MNIST beginner tutorial, there is the statement accuracy = tf.reduce_mean(tf.cast(correct_prediction, "float")) tf ... (x,1)? Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    I am building a model for binary classification problem where each of my data points is of 300 dimensions (I am ... the 300 dim space? Select the correct answer from above options...
asked Feb 1, 2022 in Education by JackTerrance
0 votes
    What is the difference between the two? It seems that both create new columns, in which their number is equal to ... they are in. Select the correct answer from above options...
asked Feb 1, 2022 in Education by JackTerrance
0 votes
    I am receiving the error: ValueError: Wrong number of items passed 3, placement implies 1, and I am struggling to ... 'sigma'] = sigma Select the correct answer from above options...
asked Feb 1, 2022 in Education by JackTerrance
0 votes
    I installed Anaconda3 4.4.0 (32 bit) on my Windows 7 Professional machine and imported NumPy and Pandas on Jupyter ... I make it work? Select the correct answer from above options...
asked Feb 1, 2022 in Education by JackTerrance
...