Skip to content

ntestu/fspy-web

 
 

Repository files navigation

fSpy-web

This is a fork of fSpy porting it to a web application so that it can be used directly from a browser.

fSpy is an open source app for still image camera matching. See fspy.io for more info. The source code is available under the GPL license.

fSpy screenshot

Using the computed camera parameters in other applications

In theory, camera parameters computed by fSpy could be used in any application that has a notion of a 3D camera and provides some way of setting the camera parameters. If you're a Blender user, have a look at the offical fSpy importer add-on. If you're using an application without a dedicated importer, you may still be able to manually copy the camera parameters from fSpy.

Interested in writing an importer for your favorite application? Then the fSpy project file format spec is a good starting point.

Building and running

The following instructions are for developers. If you just want to use the app, head to the web application.

fspy-web is written in Typescript using Vite, React and Redux. Visual Studio Code is recommended for a pleasant editing experience.

Useful commands are:

  • pnpm install: install necessary dependencies
  • pnpm start: run the app in development mode
  • pnpm build: build the app for production
  • pnpm preview: locally preview the built production app
  • pnpm run deploy: build and deploy to GitHub Pages (by committing the built app on branch gh-pages)

Note that this fork aims to make as few changes as possible to files from the base repo in order to minimize potential merge conflicts. This comes at the cost of some parts of the code being less idiomatic, e.g. anything mentioning Electron despite the project not depending on Electron anymore.

Notes

This fork was created using pnpx degit reduxjs/redux-templates/packages/vite-template-redux.

Known issues

  • Saving a project doesn't remove "(modified)" from the page title
  • Resizing the page or zooming in/out can break the page
  • Anything near a TODO(ntestu) comment in the code is incomplete

About

Web app fork of fSpy, an open source app for still image camera matching

Resources

License

Stars

Watchers

Forks

Languages

  • TypeScript 96.7%
  • JavaScript 1.4%
  • CSS 1.3%
  • Other 0.6%