Questions tagged [filter]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
14 views

Pset4 Filter: Blur Issue

So this is my first time using Stack Exchange, I have been relying on reddit so far for cs50 however I am stuck on blur. Someone on reddit told me I have to "create a temporary container that is ...
0
votes
0answers
13 views

Help on blur function. Correct logic but wont work

So after I passed pset3, I thought things would go easier since my friend said that filter wasn't as complicated as Tideman. Now, I’m doing the blur filter part and stuck on its computation especially ...
0
votes
0answers
8 views

FILTER BLUR FAILS 2 CHECKS. I taking a first principle approach. I cannot see why not full marks. Any help to all checked

// Blur image void blur(int height, int width, RGBTRIPLE image[height][width]) { RGBTRIPLE red_pixel[height][width]; RGBTRIPLE green_pixel[height][width]; RGBTRIPLE blue_pixel[height][width]; ...
0
votes
0answers
23 views

Trouble filtering center pixels in pset4 filter blur

I am SO close on reflect but am still getting a few final errors. My code for pixels on the edge and in the corners seems to work fine. However, there is an issue with my code on the center pixels and ...
0
votes
1answer
35 views

pset4 Filter (more) Edge Detection help

void edges(int height, int width, RGBTRIPLE image[height][width]) { RGBTRIPLE copy[height][width]; for (int i = 0; i < height; i++) { for (int j = 0; j < width; j++) {...
0
votes
1answer
17 views

Pset4: filter greyscale UndefinedBehaviorSanitizer (not due to incorrect order of height and width)

I've seen all the other questions and answers regarding this specific error. Thankfully, or not so, my error was not due to the order in which I looped through the image. Here's my code: void ...
0
votes
1answer
19 views

Pset4 reflect works but doesn't pass check50

I am so close on the reflect function for pset4. When I run the program it appears to work properly, but it doesn't pass check50. Does anyone know what I am doing wrong? void swap(RGBTRIPLE *a, ...
0
votes
1answer
29 views

CS50 PSET 4 REFLECT FAILS CS50

This code does indeed reflect the image, but, there is a slight line in the middle. And CS50 fails it completely // Reflect image horizontally void reflect(int height, int width, RGBTRIPLE image[...
0
votes
1answer
44 views

pset4 filter blur problem

the images is blurry but the check gives errors (it only blurs correctly the edges and corners apparently ...): :( blur correctly filters middle pixel expected "127 140 149\n", not "...
0
votes
2answers
31 views

Logic for reflect function in pset4 filter

I'm working through pset4 filter and the code for the reflect function. I'm still getting errors so clearly there's some kind of issue with my logic. When I try to apply filter to an actual image, I ...
0
votes
2answers
18 views

CS50 pset4 filter reflect issue

i am missing something here...but not sure what... it doesn't work on normal images... check50 passes for 1X2 and 1X3 images but fails for 3x3 and 4x4 images (so i guess it is an issue of iterating ...
0
votes
1answer
36 views

Pset 4 filter - blur almost works but has a few errors and I just can't figure out why

I've tried changing everything I can think of, but I can't figure out why this isn't working. #include "helpers.h" #include <math.h> int cap (int x); RGBTRIPLE rowend (RGBTRIPLE x, ...
0
votes
0answers
21 views

Getting UndefinedBehaviorSanitizer on pset4 filter blur (less comfortable)

I've tried doing this problem a few ways (without success). This time, I wrote the following code: #include "helpers.h" #include <math.h> int cap (int x); RGBTRIPLE corner (RGBTRIPLE ...
0
votes
1answer
14 views

getting undefined behaviour sanitiser deadly signal error which crashes everything when trying t run greyscale filter on pset4!

The below image shows my code and all the errors that come when I run it. I have to exit the terminal and start again to do anything! I don't understand what is wrong with the code. I have looked ...
0
votes
0answers
8 views

Issues with PSET4 Filter Edge Detection

I've been testing my edges code for ages now but I can't seem to figure out the problem. When I run the code on the sample images the images look like they have been processed properly but when I put ...
0
votes
2answers
36 views

Help with pset4 filter edge detection function

I have some problems with the edges function. The code compiles fine and all but the result looks like this: https://imgur.com/a/S2MQLom The edges of the image and one third of it don't look as ...
0
votes
1answer
23 views

Pset4 Filter Help

So far I only have gray scale done, but whenever I try to run it to see if it'll work with ./filter -g infile.bmp outfile.bmp it gives me an error message saying Could not open infile.bmp. It works ...
0
votes
1answer
29 views

pset4 filter - blur function only filters image corners

This is my second attempt at this problem, and a full rewrite; I tried once before to be as eloquent as I could, and it was just totally wrong and bizarre. So I just tried to make this one as readable ...
0
votes
1answer
19 views

Sepia Filter won't work for more complex 3x3 and 4x4 images

:) sepia correctly filters single pixel :) sepia correctly filters simple 3x3 image :( sepia correctly filters more complex 3x3 image expected "25 22 17\n66 5...", not "25 22 17\n66 ...
0
votes
0answers
11 views

Why does the code output incorrect amounts?

The code is here: https://pastebin.com/gKnVmPFf I've checked that it's not because of neighboring cells, because I am translating them onto a different array. I can't seem to figure out want is wrong. ...
1
vote
1answer
16 views

pset4 - Green and Blue off in filter (less)

My code is here. void sepia(int height, int width, RGBTRIPLE image[height][width]) { for (int i = 0; i < height; i++) { for (int j = 0; j < width; j++) { ...
2
votes
3answers
49 views

pset4 filter grey scale error

when I try to test the code I get an infinite loop of errors: UndefinedBehaviorSanitizer:DEADLYSIGNAL what am i missing ??? void grayscale(int height, int width, RGBTRIPLE image[height][width]) { for (...
0
votes
1answer
29 views

Cannot understand why valgrind is giving error although check50 runs properly

In this problem, (filter), I'm receiving all green from check50. But when I ran valgrind for blurring I got the following error: ==4412== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al....
0
votes
1answer
25 views

cs50 pset4 edge filter too much white

Hey guys i have been trying to figure out the problem with my code of the pset4 filter (more) about edge detection. My code compiles but the result image is strange, with a lot of bright/white and ...
0
votes
0answers
19 views

CS50 filter less Blur problem

I've wrote the code for filter Blur that seems to me have to work. But i don't receive right numbers. Please help me :))) void blur(int height, int width, RGBTRIPLE image[height][width]) { for (int i ...
0
votes
0answers
23 views

Pset4 Filter (more) compiles but fails almost all of check50 :(

Check50 link & code below All compiles but just can't get check50 right, I feel like there must be a common mistake between all of the functions as they all seem to get the first 3 lines of pixels ...
0
votes
0answers
27 views

PSET4 Blur Filter, blurs images correctly but check50 fails all blur checks

Not sure what I am doing wrong, I tried casting double to the blurhelper function and check50 still says it is wrong. void blur(int height, int width, RGBTRIPLE image[height][width]) { RGBTRIPLE(*...
0
votes
1answer
27 views

What is wrong with my filter blur?

Been stuck on the blurring part for ages... I've ran out of ideas and motivation to debug at this point after spending an eternity cutting down my spaghetti codes to pappardelle. Any help/hint/...
0
votes
1answer
63 views

pset4 problem with blur, can't find what's wrong

I can't seen to find what is wrong with blur in my code. My code seems fine and it compiles too but the image doesn't get as blurred as it should. I've surfed through almost all the blur related ...
0
votes
0answers
59 views

Pset4: Filter blur problem

I have an error helpers.c:130:27: runtime error: index -1 out of bounds for type 'RGBTRIPLE [width]' helpers.c:130:100: runtime error: index -1 out of bounds for type 'RGBTRIPLE [width]' helpers.c:...
0
votes
0answers
27 views

CS50 Pset4 Filter Blur less comfortable

I've tried getting blur done for some time now and I just can't get the border pixels to calculate properly as they continue to go out of bounds. I have noticed that at the start of the program ...
0
votes
1answer
31 views

CS50 PSET4 Edge calculates correct values on all tests unless the correct value is 255

I am having problems with CS50 PSet 4 - Edge. The method passes the middle pixel test (which has no value of 255 on any channel) but on any other test all the values in each channel are correct ...
0
votes
1answer
43 views

CS50 PSET4 Filter/Blur

// Blur image void blur(int height, int width, RGBTRIPLE image[height][width]) { int average = 9; for (int i = 0; i < height; i++) { for (int j = 0; j < width; j++) ...
0
votes
1answer
99 views

CS50 PSET4 FILTER BLUR

Got stuck in Blur for more than a week and can´t find out what is wrong. I´ve tried many differents ways, but only corner values matches. Can anyone please give me a help about this. // Blur image ...
0
votes
1answer
44 views

Blur function, doesn't work for 3x3 and 4x4 image

This code works in Check50 for all tests except the 3x3 and 4x4 image. If anyone has any suggestions, I would appreciate it. Thank you! // Blur image void blur(int height, int width, RGBTRIPLE image[...
0
votes
1answer
39 views

Getting partial output in Blur (pset4 filter) , trying to debug edge and middle pixel

My program when run through check50 says the corner pixels work but nothing else seems to work. I have been stuck on this problem for days and after not getting any considerable reply on the cs50 ...
0
votes
1answer
41 views

Pset4 less comfortable errors!

i just finished Week 4's Lecture and started working on the "Feeling Less Comfortable" Filter project. The issue is that I wanted to see how well everything worked before I went on to submit it and ...
0
votes
1answer
98 views

PSET4 Filter Reflect : No Reflection

Using Debug50, I can see that the RGB pixel values are appropriately swapped through. However the outfile is not actually reflected at all. The last comment section for the "fix" only seem to apply a ...
0
votes
1answer
59 views

PSET4 FILTER(LESS) BLUR HELP!

I'm struggling to figure out exactly what's wrong with the code since I think it mathematically checks out and covers every possibility of an image. Please do take a look at my code and maybe you'll ...
0
votes
1answer
57 views

Edge detection produces weird outputs

I've been stuck on this for the past while and I'm not sure what's wrong in my algorithm. I get complete nonsense for outputs and I'm kind of lost on where to go from here. Any help would be ...
0
votes
1answer
78 views

PSET #4 - Filter (more) - Edge

I've been trying to finished filter(more) all this morning, but I'm stuck with this code, I don't know why is incorrect, withcheck50 outputs in red: :( edges correctly filters middle pixel ...
0
votes
1answer
43 views

pset4 filter “edge” passed check50, but can't produce images. SEGV on unknown address

The gray, blur and reflection filter went well and can product correct images. For the "edge" filter, it passed check50, but when I tried to input image and run it, it shows below: ...
0
votes
1answer
21 views

Pset4-Blur function edge value issue

The edge value of blue is getting increased by 3, can someone help me Expected Output: 80 95 105 Actual Output: 80 98 105 // Blur image void blur(int height, int width, RGBTRIPLE image[...
0
votes
1answer
38 views

PSET4 - Filter edge too yellow

folks! I'm working on the edge detection algorithm, but for some reason, the image is turning out too yellow. I wonder if someone can give me some sort of hint at what I'm doing wrong, since I haven'...
0
votes
2answers
83 views

PSET4 filter (more) - edge

I have wrong output values :( :( edges correctly filters middle pixel expected "210 150 60\n", not "210 32 203\n" :( edges correctly filters pixel on edge expected "213 228 255\n", not "213 ...
0
votes
3answers
30 views

Blur works visually, but check50 reads errors for every section

I know that the edges and corners are supposed to read errors, because I haven't fixed them yet. What I don't understand is why check50 reads errors for middle pixels. // Blur image void blur(int ...
0
votes
1answer
139 views

pset4 filter won't open file

Every time I try to compile my code to check grayscale, I put in the input they gave in the instructions: ./filter -g infile.bmp outfile.bmp But I keep getting this message saying Could not open ...
0
votes
2answers
90 views

PSET 4 filter less comfortable (blur filter) help

Struggling with making the blur filter function for filter(less comfortable): When i try to run the program with the input and output file i get the errors marked by the asterisk (*) on line 26,27,28....
0
votes
1answer
101 views

PSET 4 Filter (less) - Simplification of code for blur

My programme works, it compiles well and it passes the check50 checks. However, I don't like how it looks - I feel it's very cumbersome, too full of logical conditions. I was wondering how I might ...
0
votes
0answers
29 views

pset4 filter(more) edges produces incorrect image

my edge detection function produces an incorrect image. I've separated my code into a few functions: edges(), sobel(), colorValue(), and a helper function copyArray(). colorValue() computes the gx or ...