GithubHelp home page GithubHelp logo

waldo-ashjain910's Introduction

INSTALLATION

The program assumes that you are using a python 2.x version and also have a necessary pip version installed.

pip install -r requirements.txt

to install the necessary libraries required to run the program.

How to run ?

python is_cropped_image.py outer1.jpg inner1.jpg

ASSUMPTIONS

There are a few assumptions that are made when writing this program.

  1. It is okay to use a external library like openCV for matching/checking images since its not explicitly mentioned to not use any libraries.
  2. The cropped file is always smaller than the original file from which the image is cropped.

LOGIC

  1. First we check if the input arguments are correct
  2. After that, we process the file_locations to check if they exist and they are of jpg/JPEG file type.
  3. Once we have established that the inputs are valid, we find out which of the images is smaller out of the given two images
  4. We use the matchTemplate() from openCV to check if the smaller_image is a part of the bigger_image.
  5. We extract the location of the smaller_image using minMaxLoc() method to output the necessary data.

waldo-ashjain910's People

Contributors

ashjain910 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.