pjreddie / vision-hw0 Goto Github PK
View Code? Open in Web Editor NEWThe 0th homework for computer vision.
The 0th homework for computer vision.
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
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.
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");
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.
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.
Could you provide some tips?
Thank you!
Br,
Seyoung
On executing make command, it is showing the following error,
make: *** No rule to make target 'obj/load_image.o', needed by 'libuwimg.so'. Stop.
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?
Hi there,
Big fan of the course so far. One note.
In the README, it shows this code
set_pixel(im, row, col, 0, 0)
But the actual code (correctly) has
set_pixel(im, col, row, 0, 0)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.