# Project export: Anchor

This document was generated by HackStack to give an AI agent context about a hackathon project. Sections are labeled with their provenance; content marked as truncated was cut to keep this document small.

## Project metadata

- Hackathon: Cal Hacks 11.0
- Tagline: The everyday smartphone is now a discrete walking cane for the visually impaired.
- Devpost: https://devpost.com/software/anchor-v8ogkf
- GitHub: https://github.com/lavirox/Anchor.git
- Team: 0 GitHub contributor(s) — 

## Devpost submission (written by the team)

### Inspiration

We were inspired by the notion of creating something easily accessible for a lot of people who need it— we thought about making the most about what we already have (underconsumption core trend) and how we can use current technologies in more ways than they’re currently being used. One of our friends broke her leg, and it was difficult to see her struggle to maintain her previous independence. We recognize how independence is much easier when you have something to “anchor” yourself—whether that a crutch, a walking cane, or a friend by your side. We wanted to make something that would help “anchor” those who need it and can get that help from something they may already have—a modern smartphone.

### What it does

Anchor is an Android app meant to aid the visually impaired by utilizing the dual lens/wide angle camera feature found on most smartphones these days. The app uses the slight angle difference between the lenses to generate a disparity map and apply a deep learning object recognition process in order to detect when certain objects surpass a certain threshold of proximity to the phone camera. In turn the user can be warned of incoming objects early on, such as walls and street lamps. The user can place their phone in a convinient location like their front pocket, so the camera captures photos regularly of the space in front of the user. It serves as a discrete and easily accessible virtual cane.

### How we built it

We used Android studio with the OpenCV library, as well as Camera2 API and the Gradle API. We used the Camera2 API and OpenCV for the simulatenous double image capture. We process image the images by first converting to grayscale to make the disparity more clear, and then applying the StereoBM algorithm to compute the disparity in terms of pixel distance. We use deep learning for object detection and identify the values that surpass the threshold for “closeness” which connects to a vibration feature on the app.

### Challenges we ran into

Issues with IDE installation and opencv dependencies.

### Accomplishments we're proud of

We are proud of being able to find a use for something that so many people already have in their pocket!

### What's next

In the future, we want to implement ML algorithms that can discern between different objects so that redundant alerts like a falling leaf or a bird don’t unnecessarily alert the user.

## README (from the GitHub repository)

No README available.

## Detected evidence (automated analysis)

Indexed codebase: 2 recognized source files, 1 KB.
- Kotlin (language) — detected in the code
- Java (language) — claimed on Devpost, not found in the code
- Python (language) — claimed on Devpost, not found in the code

## Codebase structure (from repository index)

### Files (6 of 6)

```
build.gradle.kts
gradle.properties
gradlew
gradlew.bat
local.properties
settings.gradle.kts
```

### Dependencies

No dependency index available.

### Recent commits (newest first)

- Add files via upload

## Key source files (fetched from GitHub, selected and truncated for size)

### build.gradle.kts

```kotlin
plugins {
    id("com.android.application") version "8.1.4" apply false
    id("org.jetbrains.kotlin.android") version "1.9.10" apply false
}
```

### settings.gradle.kts

```kotlin
pluginManagement {
    repositories {
        google()
        mavenCentral()
        gradlePluginPortal()
    }
}

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
    }
    versionCatalogs {
        create("libs") {
            library("android-gradle-plugin", "com.android.tools.build:gradle:8.1.2")
            library("kotlin-gradle-plugin", "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.10")
        }
    }

}

rootProject.name = "Anchor"
include(":app")
include(":opencv")
```