Git Product home page Git Product logo

vision-hw0's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

vision-hw0's Issues

OS Error[win126]

runfile('E:/Masters/6 sem/CV/RGB-HSV/vision-hw0-master/uwimg.py', wdir='E:/Masters/6 sem/CV/RGB-HSV/vision-hw0-master')
Traceback (most recent call last):

File "E:\Masters\6 sem\CV\RGB-HSV\vision-hw0-master\uwimg.py", line 5, in
import openslide

File "C:\Users\thond\AppData\Local\Programs\Python\Python36\Lib\site-packages\openslide_init_.py", line 29, in
from openslide import lowlevel

File "C:\Users\thond\AppData\Local\Programs\Python\Python36\Lib\site-packages\openslide\lowlevel.py", line 41, in
_lib = cdll.LoadLibrary('libopenslide-0.dll')

File "C:\Users\thond\anaconda3\lib\ctypes_init_.py", line 442, in LoadLibrary
return self._dlltype(name)

File "C:\Users\thond\anaconda3\lib\ctypes_init_.py", line 364, in init
self._handle = _dlopen(self._name, mode)

OSError: [WinError 126] The specified module could not be found

runfile('E:/Masters/6 sem/CV/RGB-HSV/vision-hw0-master/uwimg.py', wdir='E:/Masters/6 sem/CV/RGB-HSV/vision-hw0-master')
Traceback (most recent call last):

File "E:\Masters\6 sem\CV\RGB-HSV\vision-hw0-master\uwimg.py", line 5, in
import openslide

File "C:\Users\thond\AppData\Local\Programs\Python\Python36\Lib\site-packages\openslide_init_.py", line 29, in
from openslide import lowlevel

File "C:\Users\thond\AppData\Local\Programs\Python\Python36\Lib\site-packages\openslide\lowlevel.py", line 41, in
_lib = cdll.LoadLibrary('libopenslide-0.dll')

File "C:\Users\thond\anaconda3\lib\ctypes_init_.py", line 442, in LoadLibrary
return self._dlltype(name)

File "C:\Users\thond\anaconda3\lib\ctypes_init_.py", line 364, in init
self._handle = _dlopen(self._name, mode)

OSError: [WinError 126] The specified module could not be found

runfile('E:/Masters/6 sem/CV/RGB-HSV/vision-hw0-master/uwimg.py', wdir='E:/Masters/6 sem/CV/RGB-HSV/vision-hw0-master')
Traceback (most recent call last):

File "E:\Masters\6 sem\CV\RGB-HSV\vision-hw0-master\uwimg.py", line 5, in
import openslide

File "C:\Users\thond\AppData\Local\Programs\Python\Python36\Lib\site-packages\openslide_init_.py", line 29, in
from openslide import lowlevel

File "C:\Users\thond\AppData\Local\Programs\Python\Python36\Lib\site-packages\openslide\lowlevel.py", line 41, in
_lib = cdll.LoadLibrary('libopenslide-0.dll')

File "C:\Users\thond\anaconda3\lib\ctypes_init_.py", line 442, in LoadLibrary
return self._dlltype(name)

File "C:\Users\thond\anaconda3\lib\ctypes_init_.py", line 364, in init
self._handle = _dlopen(self._name, mode)

OSError: [WinError 126] The specified module could not be found

How to fix this error? Please share me some idea

tryit.py (doesn't work on windows) and save_image() doesn't work neither on my windows nor linux on VM

Hello,
I am very enthusiastic about learning computer vision so I checked a couple of courses and someone personally recommended yours.
Hence, I watched the 7 of the lectures and attempted homeworks 0 and 1. First of all, I was using Windows, so the make wasn't working and I had to do some things with the Powershell to make it work. Then it worked good enough to compile and run the tests, but there were errors when I tried to python tryit.py:

Traceback (most recent call last):
File "C:\D\computer_vision\Computer-Vision\tryit.py", line 1, in
from uwimg import *
File "C:\D\computer_vision\Computer-Vision\uwimg.py", line 20, in
lib = CDLL(os.path.join(os.path.dirname(file), "libuwimg.so"), RTLD_GLOBAL)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Noella\AppData\Local\Programs\Python\Python311\Lib\ctypes_init_.py", line 376, in init
self._handle = _dlopen(self._name, mode)
^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: Could not find module 'C:\D\computer_vision\Computer-Vision\libuwimg.so' (or one of its dependencies). Try using the full path with constructor syntax.

Given that there is no fun in just passing the tests without playing around with the images, I set up a Linux Virtual Machine (Ubuntu 22.04) thinking that would solve the problem. Indeed tryit.py could work, but it failed to save images. Sample error: Traceback (most recent call last):
File "C:\D\computer_vision\Computer-Vision\tryit.py", line 1, in
from uwimg import *
File "C:\D\computer_vision\Computer-Vision\uwimg.py", line 20, in
lib = CDLL(os.path.join(os.path.dirname(file), "libuwimg.so"), RTLD_GLOBAL)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Noella\AppData\Local\Programs\Python\Python311\Lib\ctypes_init_.py", line 376, in init
self._handle = _dlopen(self._name, mode)
^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: Could not find module 'C:\D\computer_vision\Computer-Vision\libuwimg.so' (or one of its dependencies). Try using the full path with constructor syntax.

PLEASE, if you give another course, clearly indicate the machine/OS prerequisites for homeworks. The lectures are great but there is no point if I can't get my hands dirty.

About 4. Shifting the image colors

I'm sorry ask question using issue.

Shift image result try below 3 methods and save image not as your example.

Could you hint what formula you mean.

thank you very much.

void shift_image(image im, int c, float v)
{
// TODO Fill this in
int i,j,k=c;
for(j = 0; j < im.h; ++j){
for(i = 0; i < im.w; ++i){
int dst_index = i + im.w*j + im.w*im.h*k;
//im.data[dst_index] += im.data[dst_index]*v;
//im.data[dst_index] += 255.0*v;
im.data[dst_index] += (im.data[i + im.w*j]*0.299+im.data[i + im.w*j+ im.w*im.h*1]*0.587+im.data[i + im.w*j+ im.w*im.h*2]*0.114)*v;

	}
}

}

im = load_image("data/dog.jpg");
shift_image(im, 0, .4);
shift_image(im, 1, .4);
shift_image(im, 2, .4);
save_image(im, "overflow");

How to get a reference white point for RGB to CIELUV conversion?

Hi Joseph,

Thank you and your team for the great course.
I'm trying to solve the extra problem "rgb to HCL".
I think I found relevant materials for the task:

I'm stuck in CIEYuv to CIELUV. According to the materials, I need to know the colour of the white point of the system. So it seems like the space is display-specific.
Screenshot 2020-04-15 at 18 34 47

I could compute the constants by converting the (1,1,1) rgb values to YUV but it probably doesn't make sense.

This OpenCV documentation has hard-coded constants. I'm currently using those values but I'm clueless how those values were computed in the first place. Also, I don't know if those values are correct for my case.
Screenshot 2020-04-15 at 18 34 14

Could you provide some tips?
Thank you!

Br,
Seyoung

Error when using "make"

C:\Users\페드로\Desktop\vision-hw0-master>make
gcc -Iinclude/ -Isrc/ -Wall -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -c ./src/load_image.c -o obj/load_image.o
process_begin: CreateProcess(NULL, gcc -Iinclude/ -Isrc/ -Wall -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -c ./src/load_image.c -o obj/load_image.o, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [Makefile:58: obj/load_image.o] Error 2

Windows 10 (x86) "make" after installing chocolatey.
Makefile is the provided one.

GCC is not installed, should I install it?
And which file is missing?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.