{"id":19038951,"url":"https://github.com/harusametime/generalnormapproximation","last_synced_at":"2026-05-07T11:30:16.806Z","repository":{"id":252753453,"uuid":"99289183","full_name":"harusametime/GeneralNormApproximation","owner":"harusametime","description":"Fast General Norm Approximation via IRLS","archived":false,"fork":false,"pushed_at":"2017-10-20T06:47:55.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-02T06:26:55.880Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/harusametime.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-04T01:18:32.000Z","updated_at":"2017-09-04T05:14:17.000Z","dependencies_parsed_at":"2024-08-12T10:00:07.319Z","dependency_job_id":null,"html_url":"https://github.com/harusametime/GeneralNormApproximation","commit_stats":null,"previous_names":["harusametime/generalnormapproximation"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harusametime%2FGeneralNormApproximation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harusametime%2FGeneralNormApproximation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harusametime%2FGeneralNormApproximation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harusametime%2FGeneralNormApproximation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/harusametime","download_url":"https://codeload.github.com/harusametime/GeneralNormApproximation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240095979,"owners_count":19746955,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T22:10:16.247Z","updated_at":"2026-05-07T11:30:16.751Z","avatar_url":"https://github.com/harusametime.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Fast General Norm Approximation \n====\n\n## Description\n\nThis is a Python implementation of a solver for the following minimization problem:\n\n\u003cp align=\"center\"\u003e\n\u003cimg src =\"https://latex.codecogs.com/gif.latex?\\min_x\u0026space;\\sum_{k=1}^{K}\u0026space;\\lambda_k\u0026space;\\left\u0026space;\\|\u0026space;A_k\u0026space;x\u0026space;-b_k\u0026space;\\right\u0026space;\\|_{p_k}\u0026space;^{p_k}\"\u003e\n\u003c/p\u003e\n\nbased on my work on \"Fast General Norm Approximation via Iteratively Reweighted Least Squares\" presented in The 4th ACCV workshop on e-Heritage 2016.\n\n## Installation\n\nPut *general_norm.py* in your directory. This program requires \n- Python 3.5\n- Numpy\n- Scipy\n- opencv (for reading images in photometric_stereo.py)\n\n## Usage\n\n```python\nfrom general_norm import GeneralNorm\nm = GeneralNorm(list_A, list_b, w, p)\nx = m.solve()\n```\n\n`list_A` is a list of scipy sparse matrices *A*, `list_b` is a list of numpy ndarray *b*, `w` is a numpy array of weights on norms, and `p` is a numpy array of p values in l_p norms. We can get *x* as solution of the minimization problem.\n\n## Example\n\n### *random_norm.py* \n\nDesign matrices *A* and solution *x* are randomly determined, and *b* is calculated by *A* *x*. Then the problem to minimize the sum of norms ||*A* *x* - *b*||_p^p is solved with respect to *x*.\n\n### *photometric_stereo.py* \n\nNormal map *N* of an object is estimated from measurement *M* and light direction *L* based on Lambert's law. This program can receive either point cloud with normals or measurement images of an object under different light directions. \n\n### *sfn.py*\nSurface represented by a set of depth is estimated from normal map *N* based on the fact that differentiation of the surface is corresponding to gradient, which can be calculated from normal. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharusametime%2Fgeneralnormapproximation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharusametime%2Fgeneralnormapproximation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharusametime%2Fgeneralnormapproximation/lists"}