Skip to main content

Questions tagged [pset4filter]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
158 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
1 answer
107 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 ...
1 vote
2 answers
81 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 ...
0 votes
1 answer
405 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
1 answer
190 views

Why does it say that my index it -1?

I am working on blur in filter and it says my index is our if bound -1 // Create count starts and end count int sh = -1; int eh = 1; int sw = -1; int ew = 1; ...
0 votes
1 answer
86 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
1 answer
106 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
1 answer
310 views

Week 4 GrayScale - Calling a function called Average within Grayscale

So I understand that the grayscale part of the assignment is supposed to be pretty basic, however, I am running into some unusual issues here. The following is my code for the grayscale filter. //...
0 votes
2 answers
380 views

Pset4 Blur (filter less) not passing check50

As title says, I am not passing check50 for blur. I am aware that my method is probably extremely tedious and not the best method, but I came up with it myself and would like to find out why it isn't ...
1 vote
1 answer
404 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 ...
0 votes
1 answer
565 views

To those who struggle with pset4’s filter-more’s edge detection filter

I’m sure it is obvious for some people, but it wasn’t for me) If your code isn’t working the way it should, you can create new .c file and put there your logic from edge detection function. You can ...
0 votes
1 answer
23 views

PSET4 LESS BLUR function -Ending Edges problem

My code works fine but for the ending edges not. I mean the right & bottom edges values. Here is my code : void blur(int height, int width, RGBTRIPLE image[height][width]) { // h = 400 w = ...
0 votes
1 answer
95 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
1 answer
1k views

Pset4 filter reverse issue

I am banging my head for the past hour on why this does not work. Basically, testing on the provided pictures, my reverse function does what it says on the tin. However, when I test it vs check50, ...
0 votes
1 answer
16 views

Iterating over the members of RGBTRIPLE struct

The RGBTRIPLE data type specified in bmp.h has three members, and I want to be able to iterate over them like: for (int k = 0; k < 3; k++) { printf("%i\n", image[i][j][k]) // prints ...
0 votes
1 answer
285 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
1 answer
166 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/...
1 vote
1 answer
92 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
1 answer
86 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
1 answer
32 views

PSET 4 filter-less problem

I'm confused about the reason I can't pass this test, if anyone can notice what's the cause I would be grateful :) here is the log : :( blur correctly filters 3x3 image Expected Output: 70 85 95 80 ...
0 votes
1 answer
17 views

CS50 Blur - Why declaring the variable outside the loop change the result?

I am working on pset4 filter-more - blur. Below is my code for the problem set. Somehow I found that if I declare my variables as per the "commented" lines in my code, the picture cannot be ...
0 votes
1 answer
24 views

Pset 4 Filter - The Blur filter. I only pass the "Blur correctly filters pixel in corner" though I can see that the output is entirely filtered

Here is my code.. It seems to work fine. I just can't tell why can't I pass the stupid checker! Hope someone can assist me. void blur(int height, int width, RGBTRIPLE image[height][width]) { ...
0 votes
1 answer
66 views

CS50 Filter-Less Reflect Function

I've been racking my brain about this problem for what should be a pretty simple issue. No matter what I've tried, I haven't been able to get an output image that is flipped - just one that is an ...
0 votes
2 answers
16 views

My version of blur doesn't seem to work according to auto grader, but is seems to work for the sample pictures

Currently I am working on filter-less more specifically the blur function. I have tested it and it works for the pictures that I try to blur. Although the auto grader is not as happy as I am. Here is ...
0 votes
1 answer
29 views

Why does make helpers return this?

Here is the error message in text: filter-less/ $ make helpers /usr/bin/ld: /lib/x86_64-linux-gnu/Scrt1.o: in function _start': (.text+0x1b): undefined reference to main' clang: error: linker command ...
0 votes
1 answer
994 views

PSET4 Filter (Less) Sepia

:( sepia correctly filters simple 3x3 image expected "100 89 69\n100...", not "100 89 69\n100..." :( sepia correctly filters more complex 3x3 image expected "25 22 17\...
0 votes
1 answer
172 views

filter-less, reflection, segmentation fault, core dumped, PSET4

dear Friends of CS50X, I have been working on pset4, filter-less, reflection for several hours now. I think my code does what it is supposed to do. Also, in my solution I tried to use the concepts ...
0 votes
1 answer
28 views

Pset 4 Blur: Keep getting close yet wrong values but I can't find problems in my code

hello so I've been coding blur for a few days and have been running check50 for a while, and I keep getting results that show that the pixel values are just off by a max range of 10. It is really ...
0 votes
1 answer
202 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 ...
-1 votes
1 answer
169 views

PSET4 - Filter(more)- Edges- Check50 error

#include"helpers.h" #include <math.h> int check_cap(int num); void edges(int height, int width, RGBTRIPLE image[height][width]) { RGBTRIPLE image_copy[...
1 vote
1 answer
37 views

PSET4 LESS BLUR function -Ending Edges problem 2nd version

New version of my previous problem here PSET4 LESS BLUR function -Ending Edges problem I know the problem is with the imitations but can't figure out what is it My code works fine but for the ending ...
0 votes
1 answer
45 views

Not sure why code isn't working: PSet4 Filter (less) - Blur

I'm not sure why my code doesn't work for the blur section of pset4 (filter; less)? (I am aware there's a more efficient way to do this, but am interested in learning what's wrong with this specific ...
1 vote
1 answer
622 views

PSET4 filter less Blur function

I am stuck in Pset4-Filter/less the Blur function in particular. My problem is the image blurred correctly but does not pass check50. Check50 result : :( blur correctly filters middle pixel >> ...
0 votes
1 answer
138 views

pset4 filter Invalid or Unsupported Image Format

I have an issue with the pset4 filter, I've applied grayscale filter and sepia filter and they are working already, but when I started to write a code for reflect filter and try to compile then ...
0 votes
1 answer
76 views

Pset4 Im having issues with the blur filter

Im extremely close to solve this problem, this is the result of check50 :) helpers.c exists :) filter compiles :) grayscale correctly filters single pixel with whole number average :) grayscale ...
0 votes
1 answer
199 views

pset4 filter (more) edge not passing check50

this is my code for Edge, and it's not passing check50. below are the errors I got. any help is appreciated. :( edges correctly filters middle pixel expected "210 150 60\n", not "28 202 ...
1 vote
1 answer
184 views

Blur - I'm so close, but yet not 100%

Apologises for the long post: I wanted to be as explicit in my logic as possible The code I've written uses the following logic to box blur: Use nested for loop to access each pixel in image Check ...
0 votes
1 answer
313 views

Pset4 Filter sepia error from check50

below is my code for Pset4 filter(less). the code compiles fine, but I was getting these errors from check50. really appreciate if anyone can help. thanks :( sepia correctly filters single pixel ...
0 votes
1 answer
16 views

cs50 pset4 grayfilter

Could someone explain me why there is a difference when you use float in front of image[i][j] compare to not using it. Because if I'm not mistaken, image[i][j].rgbtRed or the 2 others are already ...
0 votes
1 answer
115 views

PSet 4 Filter(less) Sepia - Why is my output image slightly red tinted?

At first, I forgot to cap the RGB values at 255 for sepia, and it resulted in white pixels being blue. But other areas were fine(proper sepia). So additionally, I added the ternary operators to check ...
0 votes
1 answer
57 views

Why is reflect filter not working Pset4?

Here is my code. I have overcomplicated it. for (int i=0;i<height -1; i++) { for (int j=0;j<width- 1;j++) { int value[3]; value[0]=image[i][j].rgbtBlue; value[1]=image[i][j]....
0 votes
2 answers
65 views

edges completely fails check50

So I finished my edges function and it's failing everything for check50 and I can't understand what I did wrong. Any help would be greatly appreciated. Functions related to edges: // Sets new RGB ...
0 votes
1 answer
49 views

Pset4 Blur filter, loop for searching surrounding pixels

I'm trying to write the part of the code where the surrounding pixels around the main pixel are searched in order to make the average and later replace the main value for the average value. I am ...
2 votes
1 answer
85 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
1 answer
117 views

CS50 Problem Set 4 Filter (less comfortable) help

So I have been struggling to correct my code to fix the blur function of pset4 and feel that my code is correct (even if it isn't optimally efficient). Here's how I went about it: First I looped ...
0 votes
1 answer
119 views

Cs50 Sepia properly coded

I did the sepia filter for the cs50 week 4 problem "filter) and although it works, I've been wondering, is there is not a more "proper" way to write the code, that is with out repeating ...
0 votes
1 answer
56 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
1 answer
179 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
1 answer
155 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
2 answers
67 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://i.sstatic.net/saEBo.jpg The edges of the image and one third of it don't look as ...