Questions tagged [pset4filter]

The tag has no usage guidance.

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

Runtime error in pset4

I'm currently working on filter.c, and I'm struggling with the blur segment of it. I tried to write a code (I'm aware it's a mess of hard-code, but it's an attempt!), but I keep getting this error: ...
0
votes
1answer
22 views

CS50 Pset4 Filter (More comfortable) Edges Function

I am trying to code CS50's Pset4 Filter (More comfortable)'s edges function, but I keep on getting a different value. This is the link to the video explaining what I am trying to do in this function, ...
0
votes
0answers
8 views

Pset4 filter (more) - Edge Help

I stuck on pset4 for days. Only the corners passed check50. Any help, please? void edges(int height, int width, RGBTRIPLE image[height][width]) { int cap (int c); //get a copy of all the ...
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
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
27 views

Pset 4 Filter - Blur

My blur filter produces a decent looking blurred image and passes the Check50 corner pixel case. I define the cases for the edges and the middle pixels and then manually calculate the average RGB ...
0
votes
1answer
22 views

PSET4 Reflection Filter

I'm having trouble getting my head around the pointers needed for the reflection filter. I have got to here and can't get the syntax right. Any tips would be much appreciated. Thanks. void reflect(int ...
0
votes
1answer
38 views

PSET 4 BLUR and 2 of REFLECT

All of reflect works except reflected a 1 x 2 and a 4 x 4 (3x3 works fine) None of blur works except for when a point is in the corner, which makes little sense. I've sluthed around other answers and ...
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. ...
0
votes
1answer
17 views

Pset4 less comfortable compile error

When I try to compile my helpers.c file the compiler shows me clang -ggdb3 -O0 -std=c11 -Wall -Werror -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wshadow helpers.c -...
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++) { ...
0
votes
1answer
18 views

At my wits end on pset4 filter blur

I am stumped on this problem, more specifically, on the blur filter. I can't see anything wrong with the program, but it still errors out on check50. It seems that the middle function is correct, but ...
0
votes
1answer
41 views

Need help with CS50's Filter (less) Blur

I'm doing CS50 and trying really hard to keep sane while I try to finish the last part of the Filter (less) exercise. I'm stuck on "Blur". I've tried to resist looking for help online ...
0
votes
1answer
37 views

PSET4 Filter (more) Edge

I got some weird issue with my code! It compiles without any problems. All other filters work perfectly, and check50 shows no problems (no problem in edge according to check50). But, when i try edge ...
0
votes
1answer
17 views

Is there an operator for raising in a power in C?

In PSET4 Edges Filter problem you are supposed to calculate Gx ^ 2. But the operator ^ in C does not seem to mean raising in a power. For Gx = -9 it returns Gx ^ 2 = -11 and so on. Turned out ^ is XOR ...
0
votes
1answer
18 views

Pset4 Reflect not working on 4x4 image

I get the eror only for the 4x4 image, the others are correct. Seems like the values are swapped between each other, but I cant find a way to fix it. Something in the inner loop (I think) is swapping ...
0
votes
1answer
46 views

Help with Blur filter! The output image is not blurred, but is returned as a darker image of the input

I have been stuck on this problem for days and have tried so many ways to write this code, but I continuously get errors. Nothing works. The output file is just returned as a darker image of the input ...
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
70 views

PSET 4 - Filter: Anyone able to help me on Edges?

I'm having a lot of trouble figuring out how my code for edges is failing so badly every time. Any help on this would be greatly appreciated! Here is what I'm getting back from check50: :( edges ...
0
votes
0answers
22 views

PSET4 - Filter (Less) Blur - Keep getting :( blur correctly filters middle pixel expected “127 140 149\n”, not “118 131 140\n”

void blur(int height, int width, RGBTRIPLE image[height][width]) { //A box blur //take the average of the surrounding pixels (1 row and 1 column away) //Store all the surrounding and find ...
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
39 views

PSET 4 blur function only passing one test case

void blur(int height, int width, RGBTRIPLE image[height][width]) { RGBTRIPLE copy[height][width]; int counter = 0; int red = 0; int blue = 0; int green = 0; for(int i=0; i<height; i++) { ...
0
votes
1answer
26 views

CS50 Filter blur

When I tried running this code under Check50, the value returned was completely off for some reason but I can't seem to figure out why. I then reduced the code to only calculating the rgbtBlue value ...
0
votes
1answer
12 views

What is the explaination of the declaration of image array in filter

I was looking through the filter.c file in the pset4-filter-less and I want to understand the theory behind the declaration of array as shown below: RGBTRIPLE(*image)[width] = calloc(height, width * ...
0
votes
1answer
17 views

Pset4 Grayscale Not doing anything to image - Nothing happens to the images spit out of this am I doing something wrong?

void grayscale(int height, int width, RGBTRIPLE image[height][width]) { //Image[0] is the first row of the image and Image[height - 1] is the last row of the image //Image[0][0] is the first ...
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
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
2answers
104 views

PSET 4 Errors: where did I go wrong?

So after being stuck on this pset for overlooking tiny typos I have finally gotten it to compile but I received more errors then I would like to have. If anyone could tell me where I can find the ...
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
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
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
1answer
26 views

PSET 4 Filter / Blur : I couldn't pass a struct as an function argument what is the reasson?

in order to blur the pixels I created 3 functions. BLUR -Create a new image so old date won't corrupt - iterate over the new image -blur_color - To taking the averages of the color values -...
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
72 views

pset4 Blur (Filter) not passing check50

following is my code for Blur. It works mathematically when I step through the loops for a given pixel using Tower, Yard, etc. But when running Check50, it fails every test except the corner test. ...
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
1answer
51 views

FIlters (more) - Unable to crack Edge

Below is my code for Edges. Please help me by highlighting the errors. Thanks in advance. Errors I am getting are: :( edges correctly filters middle pixel expected "210 150 60\n", not &...
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
1answer
49 views

I don't understand what's wrong with my Edge filter. Pset4

There are lots of runtime errors and overflowed integers with my code, and I have no idea why that is the case. Please could you check it out? void edges(int height, int width, RGBTRIPLE image[height]...
0
votes
2answers
113 views

Pset 4 filter: reflect help

I have been stuck on pset4 for a while and when I try to compile my code I now get 3 errors in the reflect function which are: helpers.c:83:6: error: conflicting types for 'swap' void swap(int *a,...
0
votes
2answers
19 views

Blur function doesn't work properly in 3x3 and 4x4 case

I think it's happened during neighbors cell check. I adapt the code from Java stackoverflow. The first two pixels got the rest void blur(int height, int width, RGBTRIPLE image[height][width]) { //...
0
votes
1answer
138 views

pset4 filter - blur - runtime error, colors off

This is my first post; I hope I get the netiquette right. :-) I've been stuck on pset4 / filters / blur for days. The code compiles. When I run it through check50, these two points are correct: :) ...
0
votes
0answers
52 views

Pset4 , Filter (Reflect)

I am getting the following error in the reflect part of my filter and I am not sure what it means and how should i avoid it helpers.c:71:23: error: subscript of pointer to function type 'void (int, ...
0
votes
1answer
54 views

pset4 Filter Reflect could anyone check my code, I can't find the error as to why it does not output desirably

// Reflect image horizontally void reflect(int height, int width, RGBTRIPLE image[height][width]) { int t[3]; // using temporary array to swap values for(int i=0;i<height-1;i++) // loop thru ...
0
votes
0answers
60 views

Pset 4 filter(less comfortable) manipulating pointers through an array

Very new to coding, so please bear with me! I've been trying to wrap my head around pointers/ addresses since Lecture 4 but I haven't been able to solve the following issue. I can make the following ...
0
votes
1answer
165 views

CS50 Blur issue

void blur(int height, int width, RGBTRIPLE image[height][width]) { RGBTRIPLE holder[height][width]; int red; int green; int blue; float counter; for (int i = 0; i < height; i++) { for (int j ...
0
votes
2answers
960 views

PSET4 Filter: Blur help

While trying to create an algorithm to come up with the average of the color for all nine pixels (if using 9) I realized I would need a way to see how many surrounding pixels are used in the ...
0
votes
1answer
81 views

Blur error in CS50 problem set 4 — filter_less

I have been trying to figure out the error for hours long and still no success, it'll mean a lot to me if someone can tell me what is the error in this code in order to apply a blur filter. I ...
1
vote
1answer
221 views

pset 4 filter edge not working

I am having issues with my implementation of edges. I decided to make a 'border' around the edges of the image made up of zeros (did this in a copyImage array). I get correct outputs for some of the ...