Questions tagged [filter]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
17 views

Pset4Ffilter - Starting Off

I'm doing the pset4 filter (less comfortable),but I just don't know where to start. Can someone pleases give me some starting off tips?
0
votes
0answers
10 views

Only the first test passed for Edges (Filter, more comfortable)

I have been staring at Edges for a whole day, still can't find out what's wrong with it. The test says the middle pixel is correctly calculated. but edges, corners, 3X3....no go. Anybody can offer a ...
0
votes
0answers
29 views

Problem with filter (pset 4): Blur and edge

All the filters on the filter program work well, but check50 is giving me a few errors, which I think, is due to rounding issues. But, I have checked and re-checked the code for those errors, and ...
1
vote
2answers
20 views

Blur only working with middle pixel

I've been stuck in this problem for a while, and the code only works when its inputted a middle pixel. Does anyone have a clue? I've searched everywhere for this particular issue, but I have only ...
1
vote
1answer
21 views

pset4 filter - only blurs the corners correctly

i can`t get the picture blurred at all (it comes out a complete mash up of colours blended together ...) ...i' ve been trying to figure this out for months now :(( HELP! void blur(int height, int ...
0
votes
0answers
11 views

CS50 filter more edge

I've been stuck for hours trying to solve this, so I would appreciate someones help lol So my edges filter is only passing the test for the middle pixel: I can't figure out what is wrong with my code ...
0
votes
0answers
5 views

Edge detection Program Gives Undesired Output

I have been struggling with the edge detection program. It produces weird output!!! The code is as given below: void edges(int height, int width, RGBTRIPLE image[height][width]) { float avgRedGx, ...
0
votes
1answer
16 views

Filter(less) Blur is all but correct for 1 or 2 values

I've been looking through the similar questions and they don't really help me. I clicked the link to see the results and double checked my code but it just doesn't seem to want to work. Here's my code:...
0
votes
0answers
9 views

i started doing pset4, managed to get edges to work but green is always off, can someone please help me find out what i did wrong

int cap (int value) { return value < 255 ? value: 255; } RGBTRIPLE get_edge(int i, int j, int height, int width, RGBTRIPLE image[height][width]) { int Gx[3][3] = {{ -1, 0, 1}, {-2, 0, 2}, {...
0
votes
1answer
34 views

Need help with pset4 filter blur

Getting close on pset4 filter (less) but getting hung up with the following errors for the blur function. Anyone able to see what I am doing wrong? Would welcome any advice. Here are the errors I am ...
0
votes
1answer
21 views

PSET filter reflect

Reflects sort of works, but when running cs50 check the message: :( reflect correctly filters 1x2 image expected "0 0 255\n255 0...", not "0 0 255\n0 0 2..." :( reflect ...
0
votes
1answer
28 views

cs50 Pset 4 filter:Greyscale. Cade is not averaging correctly?

So I am a little stuck on the Greyscale protion of the Pset4. I have the code in place as follows... void grayscale(int height, int width, RGBTRIPLE image[height][width]) { for (int i = 0; i < ...
2
votes
1answer
46 views

pset4 - filter program,can't figure out what exactly is the problem with blur!

Can't figure out what the problem with this code is. It seems to be working correctly for corners, but for nothing else. Please help! void blur(int height, int width, RGBTRIPLE image[height][width]) { ...
0
votes
0answers
17 views

Trouble with Blurring my Image Pset4… Running out of Bounds

I am trying to blur my image but I am running into trouble. First of all, the issue is that I run out of bounds - because I did not account for edges and corners here. Is there a simple fix - like ...
0
votes
1answer
51 views

Pset4 Reflect Filter Challenges - Not Reflecting

I am working on reflecting this image. I think I got the logic correctly, but I am not positive about that. However, my image did not reflect. Is this because I need to use malloc? I tried to but ...
0
votes
1answer
34 views

Pset 4 Blur Filter Program Seems to Compile but Doesn't Output Anything and Check50 Reads Errors

I am having trouble with the blur function. I am not given any error messages when I run the program, and it creates an output image as if the blurring is working. However, when I open the output ...
0
votes
1answer
42 views

pset4 filter/blur code problem

I have written code for the blur filter in problem set 4. The code compiles and runs fine and seems to blur the image but when I run check50 it says that the RGB values aren't correct. I have looked ...
0
votes
0answers
41 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
1answer
51 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
56 views

FILTER WORKS FINE, BUT BLUR FAILS 3x3 and 4x4

The code works fine, but it fails blur filters a 3x3 and 4x4 image. I would like a help on why it correctly blur a middle pixel, but fails those two. Apparently, the wrong pixels are either on edge (...
0
votes
0answers
36 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
46 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
33 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
48 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
39 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
152 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
70 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
36 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
55 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
55 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
16 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
10 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
43 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
30 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
62 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
57 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
14 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
31 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
71 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
40 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
35 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
24 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
26 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
33 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
37 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
142 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
86 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
39 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
43 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
55 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++) ...