Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
a7c7959
implement auto-exp
mimanerhn May 26, 2025
e338046
auto RB Gains
mimanerhn May 26, 2025
bd14d48
webapp
mimanerhn May 26, 2025
8a2cdb6
Merge branch 'WebApp'
mimanerhn May 26, 2025
80a7cd9
Merge pull request #1 from mimanerhn/WebApp
mimanerhn May 26, 2025
3eb4710
Auto-exp
mimanerhn May 26, 2025
3e76001
Merge pull request #2 from mimanerhn/Auto-exposure
mimanerhn May 26, 2025
8954298
Merge branch 'main' of https://github.com/mimanerhn/LenslessPiCam-Imane
mimanerhn May 26, 2025
440dbb3
Minor Change
mimanerhn May 26, 2025
16d0f14
Debug Logo
mimanerhn May 26, 2025
aeb1996
Capture PSF backend
mimanerhn May 26, 2025
3916860
mini change
mimanerhn May 26, 2025
f37c277
debug messages
mimanerhn May 26, 2025
06fbaca
fix
mimanerhn May 26, 2025
c4ddb7f
fix path
mimanerhn May 26, 2025
5e25cd7
path fix
mimanerhn May 26, 2025
6d8cd8e
hydra fix
mimanerhn May 26, 2025
50c7a25
fix cmd
mimanerhn May 26, 2025
6bb23b5
update
mimanerhn May 26, 2025
377a34f
change
mimanerhn May 26, 2025
06d4843
yarbi
mimanerhn May 26, 2025
ed03980
error
mimanerhn May 26, 2025
e948939
fix
mimanerhn May 26, 2025
3906ebb
mini fix
mimanerhn May 26, 2025
e429cbf
fix
mimanerhn May 26, 2025
3fc2cd6
fix
mimanerhn May 26, 2025
e94a9cd
insha
mimanerhn May 26, 2025
1fc7045
yep
mimanerhn May 26, 2025
a91aed4
f
mimanerhn May 26, 2025
3019858
fix
mimanerhn May 26, 2025
57b0bd6
puree
mimanerhn May 26, 2025
76fc966
h
mimanerhn May 26, 2025
518d4b0
yo
mimanerhn May 26, 2025
3f8b060
ok
mimanerhn May 26, 2025
ba01ee7
yo
mimanerhn May 26, 2025
f58a8d2
ok
mimanerhn May 26, 2025
ef3e0a9
puree
mimanerhn May 26, 2025
f688c38
fix
mimanerhn May 27, 2025
ec13451
oups
mimanerhn May 27, 2025
c046f2a
ok
mimanerhn May 27, 2025
bda121b
ok
mimanerhn May 27, 2025
c9e4dc5
t
mimanerhn May 27, 2025
2eb47fe
ok live text
mimanerhn May 27, 2025
993cea0
ok
mimanerhn May 27, 2025
dcb486c
yo
mimanerhn May 27, 2025
11ec192
y
mimanerhn May 27, 2025
8110eb2
yo
mimanerhn May 27, 2025
15ae706
t
mimanerhn May 27, 2025
6a6a4bb
yep
ebezzam Jun 11, 2025
cbb2fd5
changes
ebezzam Jun 11, 2025
7be583b
Update README.rst
mimanerhn Jun 22, 2025
21b96c0
Update README.rst
mimanerhn Jun 22, 2025
a41b928
Web app + All changes concerning captures
ebezzam Jul 6, 2025
16e8ac9
Updating code
mimanerhn Jul 4, 2025
a1067ac
Update Code
mimanerhn Jul 4, 2025
319dc57
changes
mimanerhn Jul 6, 2025
5db3a7b
ok
mimanerhn Jul 6, 2025
87bf99c
Auto RGB
mimanerhn Jul 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,5 @@ dmypy.json
# Pyre type checker
.pyre/

# ignore all generated outputs
lenslesswebapp/outputs/
371 changes: 94 additions & 277 deletions README.rst

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions configs/capture.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ down: null
res: null
nbits_out: 8
awb_gains: null
auto_exp_psf: false
auto_exp_img: false
# awb_gains: [1.9, 1.2] # red, blue
11 changes: 7 additions & 4 deletions lensless/utils/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,6 @@ def load_image(
if flip_lr:
img = np.fliplr(img)

if verbose:
print_image_info(img)

if bg is not None:

# if bg is float vector, turn into int-valued vector
Expand Down Expand Up @@ -204,6 +201,9 @@ def load_image(
dtype = original_dtype
img = img.astype(dtype)

if verbose:
print_image_info(img)

return img


Expand Down Expand Up @@ -292,7 +292,7 @@ def load_psf(
else:
psf = load_image(
fp,
verbose=verbose,
verbose=False,
flip=flip,
flip_ud=flip_ud,
flip_lr=flip_lr,
Expand Down Expand Up @@ -377,6 +377,9 @@ def load_psf(
else:
psf = psf.astype(original_dtype)

if verbose:
print_image_info(psf)

if return_bg:
return psf, bg
else:
Expand Down
1 change: 1 addition & 0 deletions lensless/utils/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ def plot_cross_section(
width = 2 * np.abs(first_crossing)
ax.axvline(x=-first_crossing, c="k", linestyle="--")
ax.axvline(x=+first_crossing, c="k", linestyle="--")
print(f"{plot_db_drop}dB width : {width} pixels")

ax.set_title("Cross-section")
ax.set_xlabel(f"-{plot_db_drop}dB width = {width}")
Expand Down
27 changes: 27 additions & 0 deletions lenslesswebapp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
!public/logo.png
lenslesswebapp/outputs/

54 changes: 54 additions & 0 deletions lenslesswebapp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

## Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

```js
export default tseslint.config({
extends: [
// Remove ...tseslint.configs.recommended and replace with this
...tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
...tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
...tseslint.configs.stylisticTypeChecked,
],
languageOptions: {
// other options...
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
},
})
```

You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:

```js
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'

export default tseslint.config({
plugins: {
// Add the react-x and react-dom plugins
'react-x': reactX,
'react-dom': reactDom,
},
rules: {
// other rules...
// Enable its recommended typescript rules
...reactX.configs['recommended-typescript'].rules,
...reactDom.configs.recommended.rules,
},
})
```
21 changes: 21 additions & 0 deletions lenslesswebapp/certs/cert.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-----BEGIN CERTIFICATE-----
MIIDazCCAlOgAwIBAgIUAmpNnEumFYfvt5NTep9I3OCY77EwDQYJKoZIhvcNAQEL
BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM
GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yNTA1MjYyMDQxMTNaFw0yNjA1
MjYyMDQxMTNaMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEw
HwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwggEiMA0GCSqGSIb3DQEB
AQUAA4IBDwAwggEKAoIBAQC7OtwdIEVMKhFahfN1e3TSQ9gES6wKwtK+dZhFghHG
5Sss1kMCV6zEZwklJ0fRbLO1v0r6dRI4oa/Db+N7VLyWqQ9pwg6pXm5sH50Vy/Bq
fx6+GqZJD+IyaRLuozZthIJ6kRFDtnpq4XRoyaKfR2LflEcwaoPoC4uz/+wuUNWQ
X8omD9hTrsaPRmv2EXhDIDt/qRFK/B9HKaXDhb+f26RH0BNBn2DR2fWWf7hhdzJI
Hhcjseld9FOx0aQwck/9W9TQyq6tJWv6u/YhclWluRbhJeEsRXOhPInn4nvLT8RS
Jxsmlrgseel3xCd8I1bDBqkgNJk9mXRenN63FmG1WQ23AgMBAAGjUzBRMB0GA1Ud
DgQWBBQwkkpU1nzXUjkTJ8JEhQUEF+BfYTAfBgNVHSMEGDAWgBQwkkpU1nzXUjkT
J8JEhQUEF+BfYTAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQB2
jS76qgb0/IT8NkCCH5Rz1fvCadkP3wsPhpU1hs7SQymmyWEra+M+SsyZ2jEotERg
l/wjeY0RY2YQpBOqTZ/HM0kdsz/JnMs1LciQmlVoU8Po7KiJ8m+6+WducoDYqFks
CXoQDXObfDHaRJDEcgqpPqLXMkRNZMGajB4Axp2Osbjxx2aNVqSCXDRPcnrbXaed
BWVDwDXMsGCOp0oBfldTbxSRiU3IaOaIpPzJJz2ML87hpQbO4SuXjA2gI6AOdCbc
7gcVn1HmmP0oL9EsILgqlOww8J0bEUr2AJIz9Av86Jy4iE24Q9FYDDXKApNYnsKS
lcQAnY/DCgySeDrbPwTg
-----END CERTIFICATE-----
28 changes: 28 additions & 0 deletions lenslesswebapp/certs/key.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC7OtwdIEVMKhFa
hfN1e3TSQ9gES6wKwtK+dZhFghHG5Sss1kMCV6zEZwklJ0fRbLO1v0r6dRI4oa/D
b+N7VLyWqQ9pwg6pXm5sH50Vy/Bqfx6+GqZJD+IyaRLuozZthIJ6kRFDtn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5vyWyovWZx/fGTtAoGBAI/4
CLUeIhR0qfzUl+Hhi6noFYk1PQ+qI16ZG+7kZY9WKNp67ZZ7/QqJ3z2bgWVOX027
Cg9J1fbHWOOlTU+Bh8VuWpL8H0mOlqVl9qc+u+GcyDFUhSpw42pj8TXgCDYkrMcY
STmDlycgdt/O+F2QHthOWnt8tD+yZ56WyNggzCUPAoGBAOzoNITTYRY6tBMH/yx5
xn7fL5z2nrBLv5UB1bXCXixgQr2mzVZnmHhUwTCWp99AIgCZzNRRvPMqAbt7+ue2
Db4hqzBJMgODB5GIND2qPL3nNW5Y7VmXLFilq6C9poD/1IhgTvpGX8YJju6Wv54i
ziCsqlYgH2+WobTVuJDS20ZR
-----END PRIVATE KEY-----
28 changes: 28 additions & 0 deletions lenslesswebapp/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import tseslint from 'typescript-eslint'

export default tseslint.config(
{ ignores: ['dist'] },
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ['**/*.{ts,tsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...reactHooks.configs.recommended.rules,
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
},
)
13 changes: 13 additions & 0 deletions lenslesswebapp/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/png" href="/logo.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Lensless PiCam Kit</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading