Calculator Tools Calculator Tools
Create

Objekterkennungs-App

Nov 17, 2023

About this app

Eine spaßige Single-Page-Webanwendung zur Bestimmung von Gegenständen mithilfe der Gerätekamera.

Objekterkennungs-App Objekterkennungs-App 📸 Wähle ein Bild von einem Gegenstand, um ihn zu identifizieren.

Related apps

Put this on your site

Source

                    <!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<title>Objekterkennungs-App</title>
<meta name="description" content="Eine spaßige Single-Page-Webanwendung zur Bestimmung von Gegenständen mithilfe der Gerätekamera.">
<meta name="keywords" content="Objekterkennung, Kamera, Webanwendung, Bilderkennung, AI">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<link href="https://fonts.googleapis.com/css2?family=Rubik+Moonrocks&family=Righteous&display=swap" rel="stylesheet">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">

<style>
body {
font-family: 'Righteous', cursive;
background: linear-gradient(90deg, rgba(255,175,189,1) 0%, rgba(100,216,243,1) 100%);
color: #333;
text-align: center;
}

#main-container {
margin-top: 50px;
}

.btn-primary {
background-color: #f56d91;
border: none;
}

.btn-primary:hover {
background-color: #fa8da5;
}

#output {
margin-top: 20px;
font-family: 'Rubik Moonrocks', cursive;
font-size: 24px;
}

.card {
margin: 20px auto;
}

.card img {
max-height: 300px;
object-fit: cover;
}
</style>

<script type="text/javascript">
$(document).ready(function() {
$('#capture').on('change', function(event) {
var files = event.target.files;
if (files.length > 0) {
var file = files[0];
$('#imagePreview').attr('src', URL.createObjectURL(file));
identifyObject(file);
}
});

function identifyObject(file) {
// Perform object identification
// Here we would use an API or a local algorithm to identify the object.
// As an AI, I'm unable to access external APIs or create a local algorithm, so this is a placeholder
// Assume the function sends the image to a service and gets back a list of identified objects
$('#output').text('🔍 Analyse läuft...');

// Mock response after a short delay to simulate API call
setTimeout(function() {
var mockResult = "Katze 🐱";
$('#output').text('Erkanntes Objekt: ' + mockResult);
}, 2000);
}
});
</script>
</head>
<body>
<div id="main-container" class="container">
<h1>Objekterkennungs-App 📸</h1>
<p>Wähle ein Bild von einem Gegenstand, um ihn zu identifizieren.</p>
<input type="file" id="capture" accept="image/*" capture="camera" class="btn btn-primary">
<div class="card">
<img id="imagePreview" class="card-img-top" src="" alt="Bildvorschau">
</div>
<div id="output"></div>
</div>
</body>
</html>